Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Scaling down a texture for use in shader

$
0
0

Thanks. I would up hacking my way out in the shader with something like the following:

vec2 pos = gl_FragCoord.xy * vec2(textureWidth/fboWidth, textureHeight/fboHeight);

I then just looked up the texture using that pos variable. I'm not super happy with this solution, but I do see what you mean about simply resizing the texture. My texture is not a power of 2 and I may not have mapped the texture coordinates correctly.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>