Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Shadow mapping on parallax surfaces


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 06 June 2012 - 04:13 PM

Hi,

I want to get rid of the floating shadows on parallax surfaces by offsetting position. What is the best way to do it? I tried something like: NewPos = Pos + Normal * Height and it works fine when surface is viewed head-on (shadows are distorted across parallax surface), but when its viewed from side I get floating shadows. How can I get rid of them?

Thanks!

Edited by SIIYA, 06 June 2012 - 04:14 PM.


Sponsor:

#2 InvalidPointer   Members   -  Reputation: 1443

Like
0Likes
Like

Posted 07 June 2012 - 09:38 AM

You'll actually want to be adding some fraction of the view vector to the object position, consistent with how the ray-marching/approximate ray-marching works on an intuitive level.

Humus' DXT5nm/3Dc demo has a workable example, with code.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

#3 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 07 June 2012 - 01:29 PM

Thanks! I will try it now.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS