Jump to content
  • Advertisement
Sign in to follow this  
BIGPOPA

Problem: cube mape reflection apply to a water surface

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

Hi People i hav a problem i hav a water animation class work well when i try to apply a cube texture to perform a king of Environnment Cube Mapping reflection, the result looks strange. The problem is anytime i move the camera the texture position move so now way to see any droplet reflection of the cube environnement. i use this code to perform it: Call D3dDevice.SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR) Call D3dDevice.SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3) Call D3dDevice.SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_MIRROR) Call D3dDevice.SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_MIRROR) Here is a picture of the animated water without cube mapping http://perso.numericable.fr/~gazkole/malakoff/Water_animationNoCubeMapping.JPG Here is a picture of the animated water with cube mapping http://perso.numericable.fr/~gazkole/malakoff/Water_animationWithCubeMapping.JPG Do you have any clue where this problem may come from? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Are you recalculating your water plane's normals? It looks (it's hard to tell) like the cube map is just being applied as if the surface were a flat plane, which makes me think it doesn't have the updated normal directions.

Matt

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!