Fixes Material defaults being suboptimal for material-less objects
This commit is contained in:
BIN
src/assets/TransferTest/Orbs.bin
LFS
BIN
src/assets/TransferTest/Orbs.bin
LFS
Binary file not shown.
Binary file not shown.
BIN
src/assets/invalid.png
LFS
BIN
src/assets/invalid.png
LFS
Binary file not shown.
@@ -45,7 +45,7 @@ namespace fgl::engine
|
||||
struct
|
||||
{
|
||||
std::shared_ptr< Texture > m_color_tex {};
|
||||
glm::vec4 m_color_factors { 0.0f };
|
||||
glm::vec4 m_color_factors { 1.0f };
|
||||
|
||||
std::shared_ptr< Texture > m_metallic_roughness_tex;
|
||||
float m_metallic_factor { 0.0f };
|
||||
@@ -54,19 +54,19 @@ namespace fgl::engine
|
||||
|
||||
struct
|
||||
{
|
||||
float m_scale { 0.0f };
|
||||
float m_scale { 1.0f };
|
||||
std::shared_ptr< Texture > m_texture;
|
||||
} m_normal;
|
||||
|
||||
struct
|
||||
{
|
||||
float m_strength { 0.0f };
|
||||
float m_strength { 1.0f };
|
||||
std::shared_ptr< Texture > m_texture;
|
||||
} m_occlusion;
|
||||
|
||||
struct
|
||||
{
|
||||
glm::vec3 m_factors { 0.0f };
|
||||
glm::vec3 m_factors { 1.0f };
|
||||
std::shared_ptr< Texture > m_texture;
|
||||
} m_emissive;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace fgl::engine
|
||||
alignas( 16 ) struct Albedo
|
||||
{
|
||||
TextureID color_texture_id { constants::INVALID_TEXTURE_ID };
|
||||
alignas( 4 * 4 ) glm::vec4 color_factors {};
|
||||
alignas( 4 * 4 ) glm::vec4 color_factors { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
} color;
|
||||
|
||||
alignas( 16 ) struct Metallic
|
||||
|
||||
Reference in New Issue
Block a user