Use specific material for specific Camera/Viewport

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Use specific material for specific Camera/Viewport

Post by white_waluigi »

I currently in the process of creating pointlight-shadows for deferred shading. I figured out how to render a cubic texture end project it onto objects around the pointlight correctly. The current problem is:
How can I use the Shadow castermaterial for every shadow casting object around the light?
I know you can use compositors for viewports but how can i use specific materials for speciafic viewports for specifc objects? How do you solve that for the current implementation of texture shadows?

Or How else can I render all the Objects that cast shadows using the shadow caster material for the depth-map render?
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Re: Use specific material for specific Camera/Viewport

Post by white_waluigi »

Figured it out. You have to use setmaterialscheme and handle sheme not found and replace it with the shadow caster material.
Heres some shots of the progress (took far too long sry):
http://imgur.com/HBuuUgh&dthzpiC

Edit:
more Progress, won't take too long now:

http://imgur.com/yTD62AL

But still some artifacts
Post Reply