You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Use depth pass mode with normals if required even if Environment is null
If using normal buffer debugging or if the normal texture was used, we should use PASS_MODE_DEPTH_NORMAL_ROUGHNESS regardless of whether there is a valid Environment or not. Otherwise, shaders reading the normal texture will not work without a valid Environment (and possibly other problems).
This commit is contained in:
@@ -1699,6 +1699,8 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
|
|||||||
scene_state.used_normal_texture) {
|
scene_state.used_normal_texture) {
|
||||||
depth_pass_mode = PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
|
depth_pass_mode = PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
|
||||||
}
|
}
|
||||||
|
} else if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER || scene_state.used_normal_texture) {
|
||||||
|
depth_pass_mode = PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (depth_pass_mode) {
|
switch (depth_pass_mode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user