Writing shaders for a 3d object with different sets of UV's

Started by
0 comments, last by murderv 15 years, 3 months ago
Hi, We've a 3d object (say, a building)in which a geometric entity(Set1) contains one uv channel for diffuse texture(lightmap baked) and another geometric entity (Set2) cotains two UV channel, one for tiled texture and another for light map. Certain parts of the building will have reflection. So both Set1 and Set2 will have an additional uv channel for cube map (reflection). When writing a shader(GLSL) for reflection is it possible to write a single shader for both Set1 and Set2. If yes, please give me some suggestions, else provide me some suggestions for writing separate shaders with minimum state set change. We've modeled the building as a 3d object containing different geometric entities (Set1, Set2 etc.,)based on the number of texture uv's used. Is this the correct way of modeling and applying shaders. Is it possible to model the building as one geometric mesh with different sets of uv's and with shaders applied properly? Thanks
Advertisement
use multi texcoords, and pass the differente texcoords for each channel. that should do it.

This topic is closed to new replies.

Advertisement