Creating a mosaic texture, doing offsetted lookups in WebGL/OpenGL shader.

Started by
-1 comments, last by lallish 10 years, 4 months ago

I have a block of geometry that will need a mosaic texture. Parts of the geometry will need to offset their UV coordinates to fetch the correct texture within this mosaic. I'm reusing the geometry so it will need to change texture and offsets a couple of times during runtime.

How is this best solved?

Send texture through uniform, and offset attributes to each vertex?

Or change UV-coordinates on the geometry accordingly?

Does it matter if the mosaic texture is 1d or 2d?

Thanks

This topic is closed to new replies.

Advertisement