Jump to content
  • Advertisement

Archived

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

Cold_Steel

Shadows and Untransformed vertices

This topic is 5588 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

I just have a question about creating realistic shadows. I''ve got a model system that works really well. I load my model vertices and when I draw them, I send the model space coordinates to a vertex shader where the untransformed model coordinate is transformed into world space, and then into view space. My question is, is it possible to compute shadows in any manner using this type of system? My world is going to be positioned at 0,0,0 and all coordinates in the world will of course be in world space already. But, if I''m computing how a model casts a shadow into the world, and onto itself, wouldn''t I need the transformed world space coordinates of the model''s vertices? This wouldn''t work with my system unless I somehow get the transformed coordinates (which sort of defeats the purpose of the shader) I was thinking, however, that it might be possible to compute a sort of 3-d silhouette of my model using 3 planar meshes and simply transform that into world space each frame and somehow compute shadows from that. Think something like that would work? Does anyone know if something like this has been done before?(I need something to write my undergraduate thesis on) I can''t find too much info on advanced shadow algorithms. I read through the stencil volume shadow thing on this site.

Share this post


Link to post
Share on other sites
Advertisement
There are some algorithms, just google for example ''stencil shadows'' or ''projected shadows''.
In general, you don''t need the transformed vertices.
If you know the transformations performed on the object,
you just do the ''oposit'' transformations to the light position
and compute your shadows from that light position using the
non-transformed object.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!