Skip to main content
GameDev.net gamedev.net
🔒 Locked

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

Started by lallish Dec 14, 2013 at 3:17 PM 0 replies 2.7k views
Original Post
lallish
lallish

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.