aboutsummaryrefslogtreecommitdiff
path: root/BuddhaTest/Shaders/BuddhaFragment.glsl
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2018-03-10 16:10:06 +0100
committerAndreas Grois <andi@grois.info>2018-03-10 16:10:06 +0100
commitbff9c8b80ac858a271cdff3da7daeb2b43fc75bc (patch)
tree0407b81ea46ba6d93a7e04ea9b5bce961721c676 /BuddhaTest/Shaders/BuddhaFragment.glsl
parentd1cc4a53f5492d95c260a7871cc030c9b1b0a6e9 (diff)
Move buffer dimensions out of buffer into uniforms. No longer odd -2
everywhere.
Diffstat (limited to 'BuddhaTest/Shaders/BuddhaFragment.glsl')
-rw-r--r--BuddhaTest/Shaders/BuddhaFragment.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/BuddhaTest/Shaders/BuddhaFragment.glsl b/BuddhaTest/Shaders/BuddhaFragment.glsl
index cb09628..9ef64b8 100644
--- a/BuddhaTest/Shaders/BuddhaFragment.glsl
+++ b/BuddhaTest/Shaders/BuddhaFragment.glsl
@@ -6,11 +6,12 @@ out vec3 color;
layout(std430, binding=2) buffer renderedData
{
- uint width;
- uint height;
uint counts_SSBO[];
};
+uniform uint width;
+uniform uint height;
+
uvec3 getColorAt(vec2 fragCoord)
{
uint xIndex = uint(max(0.0,(fragCoord.x+1.0)*0.5*width));