Shader override or node copy

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Shader override or node copy

Post by Valmond »

Hi everybody!

I'm in the doing of implementing PSSM (parallel shadow split maps, or maybe parallel split shadow maps) and I got a working example up and running.

Now I'm trying to integrate the code into my existing game and I have one big problem to solve:

When creating the "shadow maps" I need to use a special shader (that renders the depth and not the colour etc.) which means that I need to replace ALL my different shades (reflexive, normalmapped etc. etc.) with it and of course set back the old ones after I'm done.
This feels as cumbersome as slow so that's why I'm here :-)

Can you override like all materials in some (fast and easy) way?

The other solution I'm investigating (or trying to investigate :mrgreen: ) is that each time I add a node to the scenegrap, I'll add it to another part of the scene grapt Too but with this Depth-Shader (I already have nodes like TRANSPARENT,SOLID,SKYBOX,GLOW etc which I hide and show when I render so that I can choose in which order I draw things).

Can you easily duplicate nodes and then change the material (ie. shader) easily?

Thanks a bunch!
Post Reply