Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Shadow mapping on parallax surfaces

4: Adsense

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   

477
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.


#2 InvalidPointer   Members   

1842
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   

477
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.