I need to use DataTexture to pass UINT32 to a custom shader, where I use texelFetch() to read it into a uvec4 type variable.
uvec4 pos = texelFetch(myTexture, ivec2(0, 0), 0);
However, every time my program accesses the variable pos
, the scene becomes empty and fails to render. I’ve tried adding internalFormat
, but it didn’t work either.
texture.internalFormat=‘RGBA32UI’;
Below is my minimal program that feeds the content of the texture as point coordinates into the shader.