You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
Fixed unshaded mode lightmaps
This commit is contained in:
@@ -3112,6 +3112,13 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
|
|||||||
|
|
||||||
if (pass == 0) {
|
if (pass == 0) {
|
||||||
spec_constants |= SceneShaderGLES3::BASE_PASS;
|
spec_constants |= SceneShaderGLES3::BASE_PASS;
|
||||||
|
|
||||||
|
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED) {
|
||||||
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_OMNI;
|
||||||
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_SPOT;
|
||||||
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_DIRECTIONAL;
|
||||||
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHTMAP;
|
||||||
|
} else {
|
||||||
if (inst->omni_light_gl_cache.size() == 0) {
|
if (inst->omni_light_gl_cache.size() == 0) {
|
||||||
spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_OMNI;
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHT_OMNI;
|
||||||
}
|
}
|
||||||
@@ -3146,6 +3153,7 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
|
|||||||
} else {
|
} else {
|
||||||
spec_constants |= SceneShaderGLES3::DISABLE_LIGHTMAP;
|
spec_constants |= SceneShaderGLES3::DISABLE_LIGHTMAP;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Only base pass uses the radiance map.
|
// Only base pass uses the radiance map.
|
||||||
spec_constants &= ~SceneShaderGLES3::USE_RADIANCE_MAP;
|
spec_constants &= ~SceneShaderGLES3::USE_RADIANCE_MAP;
|
||||||
|
|||||||
@@ -1157,6 +1157,7 @@ void RendererSceneRenderRD::render_scene(const Ref<RenderSceneBuffers> &p_render
|
|||||||
render_data.lights = ∅
|
render_data.lights = ∅
|
||||||
render_data.reflection_probes = ∅
|
render_data.reflection_probes = ∅
|
||||||
render_data.voxel_gi_instances = ∅
|
render_data.voxel_gi_instances = ∅
|
||||||
|
render_data.lightmaps = ∅
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED ||
|
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED ||
|
||||||
|
|||||||
Reference in New Issue
Block a user