Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glTexImage2D(GL_TEXTURE_2D, 0, GL_R16_SNORM, 512, 512, 0, GL_RED, GL_SHORT, data);
- layout (binding = 0) uniform sampler2D heightmap;
- float height = texture(heightmap, inTexCoords).r;
- glTexImage2D(GL_TEXTURE_2D, 0, GL_R16I, 512, 512, 0, GL_RED, GL_SHORT, data);
- layout (binding = 0) uniform isampler2D heightmap; // < -- Notice I put isampler here
- float height = texture(heightmap, inTexCoords).r; // < -- This should return an ivec4, the r value should have my 16 bit signed value, right?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement