New answers tagged


A 3D texture will suit this use case much better, and it can be set up to automatically handle clamping for you rather than requiring conditions. You're using GLSL version 440, which means OpenGL 4.4+, so you have support for everything that is required: 3D textures. non-power-of-two textures. The R32F texture internal format. The texelFetch instruction.

Top 50 recent answers are included