From 37776b28677ab4c4cb61047df1fe9816e9b63642 Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 30 Jun 2021 23:17:47 -0300 Subject: Clean up RenderingServer and its bindings * Rewrote bindings for RenderingServer. * They are now all up to date. * Several unused methods and deprecated features were cleaned up. --- servers/rendering/renderer_rd/shaders/gi.glsl | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'servers/rendering/renderer_rd/shaders') diff --git a/servers/rendering/renderer_rd/shaders/gi.glsl b/servers/rendering/renderer_rd/shaders/gi.glsl index 3977f4efa0..60c881881d 100644 --- a/servers/rendering/renderer_rd/shaders/gi.glsl +++ b/servers/rendering/renderer_rd/shaders/gi.glsl @@ -77,9 +77,9 @@ struct VoxelGIData { bool blend_ambient; uint texture_slot; - float anisotropy_strength; - float ambient_occlusion; - float ambient_occlusion_size; + uint pad0; + uint pad1; + uint pad2; uint mipmaps; }; @@ -551,27 +551,6 @@ void voxel_gi_compute(uint index, vec3 position, vec3 normal, vec3 ref_vec, mat3 } } - if (voxel_gi_instances.data[index].ambient_occlusion > 0.001) { - float size = 1.0 + voxel_gi_instances.data[index].ambient_occlusion_size * 7.0; - - float taps, blend; - blend = modf(size, taps); - float ao = 0.0; - for (float i = 1.0; i <= taps; i++) { - vec3 ofs = (position + normal * (i * 0.5 + 1.0)) * cell_size; - ao += textureLod(sampler3D(voxel_gi_textures[index], linear_sampler_with_mipmaps), ofs, i - 1.0).a * i; - } - - if (blend > 0.001) { - vec3 ofs = (position + normal * ((taps + 1.0) * 0.5 + 1.0)) * cell_size; - ao += textureLod(sampler3D(voxel_gi_textures[index], linear_sampler_with_mipmaps), ofs, taps).a * (taps + 1.0) * blend; - } - - ao = 1.0 - min(1.0, ao); - - light.rgb = mix(params.ao_color, light.rgb, mix(1.0, ao, voxel_gi_instances.data[index].ambient_occlusion)); - } - light.rgb *= voxel_gi_instances.data[index].dynamic_range; if (!voxel_gi_instances.data[index].blend_ambient) { light.a = 1.0; -- cgit v1.2.3