diff options
author | Andreas Grois <andi@grois.info> | 2018-03-10 16:10:06 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-10 16:10:06 +0100 |
commit | bff9c8b80ac858a271cdff3da7daeb2b43fc75bc (patch) | |
tree | 0407b81ea46ba6d93a7e04ea9b5bce961721c676 /BuddhaTest/Shaders/BuddhaFragment.glsl | |
parent | d1cc4a53f5492d95c260a7871cc030c9b1b0a6e9 (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.glsl | 5 |
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));
|