Reading through some code about voxelization I found the following line in the fragment shader
layout (binding = 0, r32f ) coherent uniform writeonly image3D volumeTexture;
I have only used samplers
in the past and have never seen image3D
before.
I have read the entries about Sampler Varibles and Image Variables but I really don't grasp the differences, advantages/disadvantages between Sampler and Image.
Can someone help me pointing out what are the difference between these two types of variables and when should I used one over the other?
Image2D
and the code and body refer toimage3D
. Does one of these need to be edited? Which one are you asking about? $\endgroup$