Hi Jérôme,
On Sat, 2004-12-11 at 13:05, Jérôme Scholler wrote:
> Hi,
>
> I am using the experimental shaderchunk (SHLchunk). My scene is mainly
> composed of one big VRML with a lot of objects in it. Each one has a
> different texture. It works fine without shaders. I want to apply the same
> shaders to all the objects from my VRML.
> Do I have to create as many shaderchunks as objects (one for each
> geometryPtr)?
> How can I set the uniform paramater of my textures?
>
> Some enlightment about that would be a great help,
You can reuse the ShaderChunk (and therefore reduce the number of state
changes), but you have to have a separate ChunkMaterial (which is what
the VRML loader creates anyway). You just have to add the Shader and
ShaderParameter chunks to the materials in the scene and you should be
fine.
This also answers your second question: uniforms are set using a
separate ShaderParameter chunk. This allows you to use the same Shader
chunk with as many parameter settings as you want.
Hope it helps
Dirk
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users