What is the simple way to implement shadows given tools we have withing XML3D?
What I need is two pasess.
One that renders whole scene geometry into depth map, then sends this as a texture to the next pass.
Second pass also renders whole geometry but with different shaders. Is that possible?
I mean somehow easier than manually giving whole geometry to the pass and setting shaders.
The whole difference would be replacement shaders within "normal" pass.
EDIT: if it would be too hard to do shadows I can somehow bake them.
How can I save current canvas into downloadable image?
EDIT2:
There is an extension to webgl that allows you to render depth into the same buffer.
What is the simple way to implement shadows given tools we have withing XML3D?
What I need is two pasess.
One that renders whole scene geometry into depth map, then sends this as a texture to the next pass.
Second pass also renders whole geometry but with different shaders. Is that possible?
I mean somehow easier than manually giving whole geometry to the pass and setting shaders.
The whole difference would be replacement shaders within "normal" pass.
EDIT: if it would be too hard to do shadows I can somehow bake them.
How can I save current canvas into downloadable image?
EDIT2:
There is an extension to webgl that allows you to render depth into the same buffer.