Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xunil_RJ

Shadow Map in a TNT

This topic is 5391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

only recently i discovered that my poor TNT could do Shadow Map... so i get the courage to try... the problem is that i think everything is right ( everybody always think )... i was using the www.paulsprojects.net shadow example, and my code i almost the pauls code... but i see no shadows... if anyone need a screenshot i can post... so... here is the code... http://www16.brinkster.com/emgames/main.cpp ps: i´ve used the forum search... but havent found anything that may help me...

Share this post


Link to post
Share on other sites
Advertisement
stencil buffer? i´m not using stencil buffer...
here is what i´m doing...

1 - Render the scene from ligh´s point of view
2 - Getting the depth buffer and putting in a texture ( shadow map )
3 - Rendering from camera´s point of view with black light ( the shadowed area )
4 - Rendering again from camera´s point of view... but now with white light ( the area with no shadow )
4.1 - I´m projecting the shadow map in the scene
4.2 - I´m also projecting a 1D Texture ( i´ve not undestood this texture... but in the example he is using, so i´m using )
4.3 - I´m using some glTexEnvi() to make the areas where shadow exist be with alpha channel 1.0....
5 - I´m using the Alpha Test to eliminate the shadow area from pass 4

oh... my desktop is 32 bit already...

[edited by - xunil_rj on February 9, 2004 8:24:06 AM]

Share this post


Link to post
Share on other sites
Thats a bad technic.
Your lightmap will be all lighted lol
You get no shadows. Because you render the scene FROM the light. So you can not see shadows casted by this light!! And you project a shadow map without shadow.
If you want to make real time shadow casting, the best thing is stencil buffer. But I dont think your TNT support it, or if it does, you will get fps prob. Suggest you create standard lightmaps.

[edited by - daivuk on February 9, 2004 10:59:26 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!