Hot answers tagged

1

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.


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