Hello Alastair,

If you parse the forum/mailing list for shadow and multitexturing or other terms you will find a heap of information about this. In general you'll have to write your own custum shader in order to use shadow with more than one texture /3d-texture and so on. The stock shadow-shader is only sampling one base texture and performs simple lighting.

In my projects I've abstracted the shadow to a separate function in the vertex and fragment shaders (usually call float shadowTerm()) which is then later called for fragment color determination (e.g. gl_FragColor = ambient + shadowTerm *diffuse)

hth
Sebastian

Hello,

Can anyone tell me if it's possible to get any of the shadow map techniques to 
work with an object using texture3D?

I can only get the shadow texture technique work, shadow map just seems to 
overwrite the texture on the objects.

Do I need to put the shadows in a different texture unit or something?

Any help much appreciated!,

Many thanks,
Ally

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42933#42933





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to