Advertisement

Shadow maps, conecpt question

Started by January 27, 2005 01:32 PM
2 comments, last by lc_overlord 19 years, 10 months ago
I've never done shadow maps before and figured I would ask a few easy questions before I planed out and did my shadowmap class. 1) In the first pass when i render to texture (depth component)(going to use a pbuffer) from the view of the light, i know i place the camera at the lights location but do I face it at the same point as the scenes camera? 2) The first pass again, how do i determine what FOV I will want to use? I figure it depends on how far the light is away and how much of the scene the camera can see. Thanks for any replies.
1. no, you aim it towards the direction your spotlight is facing

2. it depends on how wide the spotlight cone is, it does not depend on how far away it is or anything like that.
Basicly use any fov as you want, as long as you use the same in the shader.
Advertisement
Ahh, well i plan to use this as a point light. Basicly a sun casting shadows of objects onto a terrain.

I guess the repsonce changes now that i specify what I need to do :)

If you are going to use it as a pointlight you could use six spotlights and project them in the same way you would use a skybox.

IF you are going to use it as a sun just set it up so it overlooks the entire scene.

This topic is closed to new replies.

Advertisement