multiple projected textures on terrain

classic Classic list List threaded Threaded
3 messages Options
neshume neshume
Reply | Threaded
Open this post in threaded view
|

multiple projected textures on terrain

I would like to perform projective texturing on map by using the virtualProgram.
Since I have several nodes (aircraft models) that project an image on the terrain and i am using the same virtual program how is multiple texture units handled using the same virtual program or Do i have to manage it by myself (since the same virtual program from several nodes is performed on the same map node).

cheers,

neshume
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: multiple projected textures on terrain

Hi,
What have you done so far? Do you have it working with one texture? If so, expanding to work with multiple projected textures is no different than you would do in a normal Program. You calculate the projective texture coordinates for each one, and then sample each one in the fragment shader and combine them however you like.
Glenn Waldron / Pelican Mapping
neshume neshume
Reply | Threaded
Open this post in threaded view
|

Re: multiple projected textures on terrain

thx for the reply.

of course expanding the number of projectors is not the problem ... the problem was multiple shaders with the same virtual program with the same uniforms

what i have done to solve this was using stub names in shader __uniform_name__ and replaced the stubs as done in the colorFilter.

And this seems to work.

before solving this I was wondering how to do that with the same virtual program.

cheers,

neshume