Add specular occlusion from ambient light

Co-authored-by: guerro323 <kaltobattle@gmail.com>
This commit is contained in:
landervr
2025-05-06 16:51:00 +02:00
parent 1a1cc0f7b0
commit 56730d0cb2
17 changed files with 72 additions and 6 deletions

View File

@ -4872,6 +4872,11 @@ RenderForwardClustered::RenderForwardClustered() {
defines += "\n#define USE_VERTEX_LIGHTING\n";
}
bool specular_occlusion = GLOBAL_GET("rendering/reflections/specular_occlusion/enabled");
if (!specular_occlusion) {
defines += "\n#define SPECULAR_OCCLUSION_DISABLED\n";
}
{
//lightmaps
scene_state.max_lightmaps = MAX_LIGHTMAPS;

View File

@ -766,6 +766,8 @@ void SceneShaderForwardClustered::init(const String p_defines) {
actions.render_mode_defines["debug_shadow_splits"] = "#define DEBUG_DRAW_PSSM_SPLITS\n";
actions.render_mode_defines["fog_disabled"] = "#define FOG_DISABLED\n";
actions.render_mode_defines["specular_occlusion_disabled"] = "#define SPECULAR_OCCLUSION_DISABLED\n";
actions.base_texture_binding_index = 1;
actions.texture_layout_set = RenderForwardClustered::MATERIAL_UNIFORM_SET;
actions.base_uniform_string = "material.";