Yesterday, I decided to learn more about O3D render/scene graphs in order to implement multi-pass shading effects. It’s still a bit of a hack, but I’ve written a few helper functions for myself to abstract away some of the leg-work in assigning render targets and uniforms whilst creating ViewInfo objects, as well as creating materials with shaders.
I do have one problem with accessing the depth buffer as a texture, but I’ve posted on the O3D-discuss mailing list and I’m hopeful someone will have an answer there. This has meant that I’ve had to write a custom phong-shader which writes the depth to the alpha channel. Anyway, read on to see what I came up with.
(more…)
