aboutsummaryrefslogtreecommitdiff
path: root/BuddhaTest/Shaders/BuddhaFragment.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'BuddhaTest/Shaders/BuddhaFragment.glsl')
-rw-r--r--BuddhaTest/Shaders/BuddhaFragment.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/BuddhaTest/Shaders/BuddhaFragment.glsl b/BuddhaTest/Shaders/BuddhaFragment.glsl
index 4978765..cb09628 100644
--- a/BuddhaTest/Shaders/BuddhaFragment.glsl
+++ b/BuddhaTest/Shaders/BuddhaFragment.glsl
@@ -14,7 +14,7 @@ layout(std430, binding=2) buffer renderedData
uvec3 getColorAt(vec2 fragCoord)
{
uint xIndex = uint(max(0.0,(fragCoord.x+1.0)*0.5*width));
- uint yIndex = uint(max(0.0,(fragCoord.y+1.0)*0.5*height));
+ uint yIndex = uint(max(0.0,abs(fragCoord.y)*height));
uint firstIndex = 3*(xIndex + yIndex * width);
return uvec3(counts_SSBO[firstIndex],counts_SSBO[firstIndex+1],counts_SSBO[firstIndex+2]);
}