Game Development Community

Modifying the real time shadow render code

by Manoel Neto · in Torque Game Engine · 11/10/2005 (7:30 am) · 0 replies

Hi,

I noticed the real time shadow code renders only the triangles facing away from the camera. This causes some problems for us with "open" meshes, with some faces that should cast shadows not being rendered in the shadows. I tried commenting out the "backface culling" check in the bitRender::render_strips() function, but it only caused the shadows to be drawn in a totally weird way. Seems the math is tailored for backfaces, and needs to be changed to draw front faces. The thing is... that rendering code is rather a bit dauting to me right now, and I can't quite understand it well enough to make it draw the triangles facing towards the camera, instead of the ones facing away, so I can get correct shadows.

Did someone ever change that, or knows a bit about the bitRender::render_strips() function to give me some advice?