Merge pull request #25670 from aqnuep/bake_mode_affect_gi_prove

Disable GI probe capturing lights with bake mode disabled
This commit is contained in:
Rémi Verschelde
2019-04-30 18:33:34 +02:00
committed by GitHub
13 changed files with 67 additions and 0 deletions
@@ -5219,6 +5219,7 @@ RID RasterizerStorageGLES3::light_create(VS::LightType p_type) {
light->directional_blend_splits = false;
light->directional_range_mode = VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE;
light->reverse_cull = false;
light->use_gi = true;
light->version = 0;
return light_owner.make_rid(light);
@@ -5310,6 +5311,15 @@ void RasterizerStorageGLES3::light_set_reverse_cull_face_mode(RID p_light, bool
light->instance_change_notify(true, false);
}
void RasterizerStorageGLES3::light_set_use_gi(RID p_light, bool p_enabled) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND(!light);
light->use_gi = p_enabled;
light->version++;
light->instance_change_notify(true, false);
}
void RasterizerStorageGLES3::light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode) {
Light *light = light_owner.getornull(p_light);
@@ -5415,6 +5425,13 @@ Color RasterizerStorageGLES3::light_get_color(RID p_light) {
return light->color;
}
bool RasterizerStorageGLES3::light_get_use_gi(RID p_light) {
Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND_V(!light, false);
return light->use_gi;
}
bool RasterizerStorageGLES3::light_has_shadow(RID p_light) const {
const Light *light = light_owner.getornull(p_light);