Merge pull request #2724 from SaracenOne/disable_baked_light_sampling_on_shadeless

Disable baked lighting sampling on shadeless materials.
This commit is contained in:
Juan Linietsky 2015-11-18 19:31:18 -03:00
commit 0fd3e18818

View File

@ -6530,6 +6530,8 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans
material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP,false);
material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_DP_SAMPLER,false);
if (material->flags[VS::MATERIAL_FLAG_UNSHADED] == false && current_debug != VS::SCENARIO_DEBUG_SHADELESS) {
if (e->instance->sampled_light.is_valid()) {
SampledLight *sl = sampled_light_owner.get(e->instance->sampled_light);
@ -6566,7 +6568,8 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans
}
}
} else if (baked_light->mode==VS::BAKED_LIGHT_LIGHTMAPS) {
}
else if (baked_light->mode == VS::BAKED_LIGHT_LIGHTMAPS) {
int lightmap_idx = e->instance->baked_lightmap_id;
@ -6606,6 +6609,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans
rebind = true;
}
}
}
if (sort_flags!=prev_sort_flags) {