Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create fast and easy scene-independent shadows w/o shaders in OpenGL

Let i have some mesh (for ex. sphere) in the center of room, full of cubes and one light source. How can i make fast and easy shadow-casting in OpenGL, using "standard" (fixed) functions only? Note: the result must contain cube and sphere shadows as well.

like image 927
shybovycha Avatar asked Nov 21 '10 12:11

shybovycha


1 Answers

If you can generate a silhouette of the sphere then you could use shadow volumes. nVidia hardware has also supported fixed function shadow mapping for a fair while as well.

Shadow volumes have the disadvantage of very high fill rate requirements. Shadow maps can be better but require an extra pass.

If you are projecting on to a single plane it may well be easier to just project the object on to a plane.

like image 137
Goz Avatar answered Sep 28 '22 06:09

Goz