GL_TEXTURE_RECTANGLE with GLuint data?

Is this the spec you are referring to? http://www.opengl.org/registry/doc/GLSLangSpec.3.30.6.pdf
I couldn’t find any reference to texelFetch in it by searching

That is why he put a second link …
http://www.opengl.org/wiki/GLSL_Sampler#Direct_texel_fetches

Thanks I saw that. Unfortunately from what I read here, texelFetch doesn’t support wrap either :\

I think you can do wrapping in shader using something like this,


vec4 leftVal=texture(texturemap, mod(uv.st+vec2(-1,0), textureSize()));
vec4 rightVal=texture(texturemap, mod(uv.st+vec2(1,0), textureSize()));
vec4 topVal=texture(texturemap, mod(uv.st+vec2(0,-1), textureSize()));
vec4 rightVal=texture(texturemap, mod(uv.st+vec2(0,1), textureSize()));

I am not sure if this works but u can try.

I ended up doing this. It seems to work correctly, maybe some sort of problem with wrapping on the bottom edge but this was just a quick exercise anyway so I’m happy with it :slight_smile:

Thanks all for the help on this one. Here’s a few vids of the results
1
2
3