summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/shaders/resolve.glsl
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-01-24 16:00:20 -0300
committerreduz <reduzio@gmail.com>2021-01-24 20:17:28 -0300
commita9beb7aa8c9e81c57ff4c9753c846bf14c5a1620 (patch)
treea171779287d4244f016863f32b5ec3dd106e8d9d /servers/rendering/renderer_rd/shaders/resolve.glsl
parent6fe342478b7203ca36fdbaa34a31618c5bba42ce (diff)
Shadow map rendering optimization
-All shadow rendering is done with raster now (no compute) -All shadow rendering is done by rendering directly to the shadow atlas -Improved how buffer clearing is done to optimize the above. -Ability to set shadows as 16 bits.
Diffstat (limited to 'servers/rendering/renderer_rd/shaders/resolve.glsl')
-rw-r--r--servers/rendering/renderer_rd/shaders/resolve.glsl7
1 files changed, 3 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/shaders/resolve.glsl b/servers/rendering/renderer_rd/shaders/resolve.glsl
index 7cb5235a56..e83c4ca93b 100644
--- a/servers/rendering/renderer_rd/shaders/resolve.glsl
+++ b/servers/rendering/renderer_rd/shaders/resolve.glsl
@@ -71,19 +71,19 @@ void main() {
group1.y = texelFetch(source_depth, pos, 1).r;
//4X
- if (params.sample_count <= 4) {
+ if (params.sample_count >= 4) {
group1.z = texelFetch(source_depth, pos, 2).r;
group1.w = texelFetch(source_depth, pos, 3).r;
}
//8X
- if (params.sample_count <= 8) {
+ if (params.sample_count >= 8) {
group2.x = texelFetch(source_depth, pos, 4).r;
group2.y = texelFetch(source_depth, pos, 5).r;
group2.z = texelFetch(source_depth, pos, 6).r;
group2.w = texelFetch(source_depth, pos, 7).r;
}
//16X
- if (params.sample_count <= 16) {
+ if (params.sample_count >= 16) {
group3.x = texelFetch(source_depth, pos, 8).r;
group3.y = texelFetch(source_depth, pos, 9).r;
group3.z = texelFetch(source_depth, pos, 10).r;
@@ -115,7 +115,6 @@ void main() {
}
if (freq.w < min_f) {
best_index = 3;
- min_f = freq.w;
}
} else if (params.sample_count == 8) {
vec4 freq0 = vec4(equal(group1, vec4(group1.x)));