if(use_emission_map)
return texture(emission_map, texcoord.xy).rgb;
else
- return basic_material.emission.rgb;
+ return pbr_material.emission.rgb;
}
/* Computes the diffuse reflection of the macrosurface */
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)
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)
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)
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)