Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL400/RasterizationOrderFp.glsl @ 12115

Last change on this file since 12115 was 12115, checked in by wiesep, 5 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 485 bytes
Line 
1#version 400
2
3#extension GL_ARB_shader_atomic_counters : enable
4
5layout(binding=0, offset=0) uniform atomic_uint ac;
6
7out vec4 fragColour;
8
9void main(void)
10{
11    uint counter = atomicCounterIncrement(ac);
12    uint mask = (1 << 8) - 1;
13    // fragColour = vec4(
14    //     ((counter & (mask <<  0)) % 255) / 255.f,
15    //     ((counter & (mask <<  8)) % 255) / 255.f,
16    //     ((counter & (mask << 16)) % 255) / 5.f,
17    //     0.5);
18    fragColour = vec4(counter/uint(4E9),0,0,0);
19}
Note: See TracBrowser for help on using the repository browser.