Color: Rename to_srgb/to_linear to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making both input and output color spaces explicit.
This commit is contained in:
@@ -884,7 +884,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa
|
||||
Light3D *light = lights_found[i].light;
|
||||
Transform3D xf = lights_found[i].xform;
|
||||
|
||||
Color linear_color = light->get_color().to_linear();
|
||||
Color linear_color = light->get_color().srgb_to_linear();
|
||||
if (Object::cast_to<DirectionalLight3D>(light)) {
|
||||
DirectionalLight3D *l = Object::cast_to<DirectionalLight3D>(light);
|
||||
lightmapper->add_directional_light(light->get_bake_mode() == Light3D::BAKE_STATIC, -xf.basis.get_axis(Vector3::AXIS_Z).normalized(), linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_SIZE));
|
||||
|
||||
Reference in New Issue
Block a user