Add specular occlusion from ambient light
Co-authored-by: guerro323 <kaltobattle@gmail.com>
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user