]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pbrmaterial.cpp
Use correct shader variable names for PBR materials
[libs/gl.git] / source / pbrmaterial.cpp
index 130c4bf3a403d1b4097f9dae62269331008c5d56..8406d4e253e41492afcbd8a0bcda92a830c9e31c 100644 (file)
@@ -51,7 +51,7 @@ void PbrMaterial::attach_textures_to(Texturing &texturing, ProgramData &tex_shda
 void PbrMaterial::set_base_color(const Color &color)
 {
        base_color.value = color;
-       shdata.uniform("material.base_color", color);
+       shdata.uniform("pbr_material.base_color", color);
 }
 
 void PbrMaterial::set_base_color_map(const Texture *tex)
@@ -67,7 +67,7 @@ void PbrMaterial::set_normal_map(const Texture *tex)
 void PbrMaterial::set_metalness(float value)
 {
        metalness.value = value;
-       shdata.uniform("material.metalness", value);
+       shdata.uniform("pbr_material.metalness", value);
 }
 
 void PbrMaterial::set_metalness_map(const Texture *tex)
@@ -78,7 +78,7 @@ void PbrMaterial::set_metalness_map(const Texture *tex)
 void PbrMaterial::set_roughness(float value)
 {
        roughness.value = value;
-       shdata.uniform("material.roughness", value);
+       shdata.uniform("pbr_material.roughness", value);
 }
 
 void PbrMaterial::set_roughness_map(const Texture *tex)
@@ -94,7 +94,7 @@ void PbrMaterial::set_occlusion_map(const Texture *tex)
 void PbrMaterial::set_emission(const Color &color)
 {
        emission.value = color;
-       shdata.uniform("material.emission", color);
+       shdata.uniform("pbr_material.emission", color);
 }
 
 void PbrMaterial::set_emission_map(const Texture *tex)