1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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

@@ -4225,6 +4225,9 @@ RasterizerSceneGLES3::RasterizerSceneGLES3() {
if (config->force_vertex_shading) {
global_defines += "\n#define USE_VERTEX_LIGHTING\n";
}
if (!config->specular_occlusion) {
global_defines += "\n#define SPECULAR_OCCLUSION_DISABLED\n";
}
material_storage->shaders.scene_shader.initialize(global_defines);
scene_globals.shader_default_version = material_storage->shaders.scene_shader.version_create();
material_storage->shaders.scene_shader.version_bind_shader(scene_globals.shader_default_version, SceneShaderGLES3::MODE_COLOR);