Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Using multiple shaders on an object?

Author
Message
Mr Bigglesworth
18
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 21st Nov 2013 17:25 Edited at: 21st Nov 2013 17:41
I was wondering how you would go about using two or more shaders on one object as I want to use dynamic shadow mapping combined with baked shadows from Mapscape (I am using evolved's shadow shader and lightmap.fx for the map).

I tried changing the effect and textures applied to the object in the loop but it is to slow and doesn't really work. So i guess I am wondering if I can render an object with one effect and then render it again with another effect.
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 21st Nov 2013 19:01
I think you would just have to make your own shader that does the combined task of both desired shaders.
Another option would be to use forward rendering and render the scene multiple times, swapping shaders in-between, to a quad and then use a post-processing shader to combine the outputs. That doesn't work well with shadows that are dependent on transparency however.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2026-07-06 20:16:31
Your offset time is: 2026-07-06 20:16:31