Jump to content
  • Advertisement
Sign in to follow this  

Texture2D from volumetrics effects, missing depth

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

Hello ;)
For my little graphical engine, I'm trying to add some volumetrics effects (like clouds). 
For that, I filled all the viewing frustum with a 3D Texture (with 128 slices at low res).
Noise is applied on every slice and a final pass is used for compute all the slices into one texture 2D.
The final texture is applied on top of the scene (full screen quad) with alpha blending.
Volumetric clouds are working very well ! I'm happy for that ;)
But now, I have an another problem. As the final texture 2d didn't have depth informations, my clouds are overlapping the world.
Don't know how to say (and my english is bad). Imagine far away clouds, but close mountains appear behind the clouds (must be inversed).
Some clouds need to be between mountains and camera, and some other, behind mountains, depending on their distances.
I tested with a depth map (from camera) of the world, used when the noise is applied, but cannot get it to works.. 
Any idea how to achieve this or the depth map is my only solution ?
I'm working with DirectX 11 (C++).
Thank you and a happy new year !

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.

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

Sign me up!