diff options
Diffstat (limited to 'BuddhaTest/Shaders')
-rw-r--r-- | BuddhaTest/Shaders/BuddhaCompute.glsl | 6 | ||||
-rw-r--r-- | BuddhaTest/Shaders/BuddhaFragment.glsl | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/BuddhaTest/Shaders/BuddhaCompute.glsl b/BuddhaTest/Shaders/BuddhaCompute.glsl index ddbaf93..458a4e3 100644 --- a/BuddhaTest/Shaders/BuddhaCompute.glsl +++ b/BuddhaTest/Shaders/BuddhaCompute.glsl @@ -4,13 +4,13 @@ layout(std430, binding=2) buffer renderedData
{
- uint width;
- uint height;
uint counts_SSBO[];
};
-uniform uint iterationCount;
+uniform uint width;
+uniform uint height;
+uniform uint iterationCount;
uniform uvec3 orbitLength;
void addToColorOfCell(uvec2 cell, uvec3 toAdd)
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));
|