1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Add sky_only setting to DirectionalLight3Ds

This commit is contained in:
clayjohn
2020-10-21 23:22:53 -07:00
parent c3964b6c83
commit 6299575250
15 changed files with 106 additions and 24 deletions

View File

@@ -4950,6 +4950,20 @@ bool RasterizerStorageRD::light_directional_get_blend_splits(RID p_light) const
return light->directional_blend_splits;
}
void RasterizerStorageRD::light_directional_set_sky_only(RID p_light, bool p_sky_only) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
light->directional_sky_only = p_sky_only;
}
bool RasterizerStorageRD::light_directional_is_sky_only(RID p_light) const {
const Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND_V(!light, false);
return light->directional_sky_only;
}
RS::LightDirectionalShadowMode RasterizerStorageRD::light_directional_get_shadow_mode(RID p_light) {
const Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL);