Skip to content

Instantly share code, notes, and snippets.

@tobspr
Created June 27, 2014 13:55
Show Gist options
  • Save tobspr/034e39243a936f92b6f6 to your computer and use it in GitHub Desktop.
Save tobspr/034e39243a936f92b6f6 to your computer and use it in GitHub Desktop.
vec4 result = vec4(0, 0, 0, 1);
int abc = 0;
for (int i = 0; i < 2000; i ++) {
abc += i;
}
result.x = float(abc) / 200000.0;
ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);
imageStore(destTex, storePos, result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment