Hey,
I'm a novice to shaders - not a 100% noob but - I thought if there is any way to make two or more shaders do things cooperative, let's say that one shader was for Phong lighting but I also want to apply another one, say for shadows or reflection (totally irrelevant). So is there any way for pixel shader #2 (shadow) to take the output of first pixel shader (phong) and combine it them together - like lighting * shadowamount or something?
I know this can be done using only one shader, but I was just asking how to do that because I've come to an idea of dragging preset shader passes together to form a nice material that perfectly suits someone's needs.
Also, I think there's the way to do this with render targets, but I don't think this is 100% precise and may cause an awful performance drop, so I don't think it's the best option (unless it's the only one).
Thanks in advance,
Geo
Shader passes
-
- Posts: 91
- Joined: Sun Oct 19, 2008 5:29 pm
- Location: Valencia (Spain)
- Contact:
- If you know how to program shader (GLSL or HLSL) will have an easy, only have to create what you want and eventually join them.
- If you want to join the shaders one by one from Irrlicht you need to use transparencies and render the mesh again and again.
I suggest you look at my projects for how to make Multipass, and to represent more than 2 shaders on scene:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=36308
I hope they bring you
- If you want to join the shaders one by one from Irrlicht you need to use transparencies and render the mesh again and again.
I suggest you look at my projects for how to make Multipass, and to represent more than 2 shaders on scene:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=36308
I hope they bring you