| 1234567891011121314151617181920 |
- #version 430 core
- uniform int max_val;
- uniform int count;
- layout(std430, binding = 1) coherent buffer dataBuffer
- {
- int data_SSBO[];
- };
- layout(local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
- void main(){
- if(gl_GlobalInvocationID.x >= count){
- return;
- }
- if(data_SSBO[gl_GlobalInvocationID.x] > max_val){
- data_SSBO[gl_GlobalInvocationID.x] = 0;
- }
- }
|