Last change
on this file since 12216 was
12115,
checked in by wiesep, 6 years ago
|
Changed folder structure, deletet some unused files and cleaned up code
|
File size:
538 bytes
|
Line | |
---|
1 | #version 430 |
---|
2 | |
---|
3 | layout(binding = 0, rgba8) coherent uniform image2D image_data; |
---|
4 | |
---|
5 | uniform float roll; |
---|
6 | |
---|
7 | layout (local_size_x = 16, local_size_y = 16, local_size_z = 1) in; |
---|
8 | |
---|
9 | // source/ details: http://wili.cc/blog/opengl-cs.html |
---|
10 | void main() |
---|
11 | { |
---|
12 | ivec2 storePos = ivec2(gl_GlobalInvocationID.xy); |
---|
13 | |
---|
14 | float localCoef = length(vec2(ivec2(gl_LocalInvocationID.xy)-8)/8.0); |
---|
15 | float globalCoef = sin(float(gl_WorkGroupID.x+gl_WorkGroupID.y)*0.1 + roll)*0.5; |
---|
16 | imageStore(image_data, storePos, vec4(vec2(1.0-globalCoef*localCoef),1.0,1.0)); |
---|
17 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.