Hot answers tagged

2

If you could use imageLoad/Store to do atomic operations, there would be no need for atomic operations as a distinct class of operations. So no, you can't. There is no correct set of barriers or other properties that will allow this to work generally the way atomic operations do.


1

Is the division of the coordinates x/w,y/w,z/w the last operation that happens on the GPU? The division you are referring to is generally called "The Perspective Divide". You can google it and get information overload on helpful documentation. The division itself happens after the geometry shader before the fragment shader as part of rasterization....


1

How are you randomizing the samples you take? It looks to me like maybe the random values are the same across all pixels in the image, which would explain why you see 10 coherent bright spots when you have 10 samples. The samples should be re-randomized for each pixel. This should produce a noisy result, with a single blurred-out bright spot instead of 10 (...


1

First, regarding the specific problem of bits of the geometry being lost to the near and far planes, this can be solved by using depth clamping instead of depth clipping. This disables clipping against the near and far planes, in favor of clamping the output depth values to [0, 1]. (Geometry behind the camera will still be clipped though.) Given this, ...


Only top voted, non community-wiki answers of a minimum length are eligible