Some trouble with shader rendering a raycast sphere with depth texture and mesh geometry #13330
Unanswered
masonblier
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently followed Sebastian Lague's planets videos but using Bevy instead. These use a post processing shader to render ocean and atmosphere effects using a raycast.
Repository here: https://github.com/masonblier/planet_test
Relevant code is here https://github.com/masonblier/planet_test/blob/main/assets/shaders/post_processing.wgsl
Unfortunately there is a problem with how I'm doing the ray cast, or maybe how I'm calculating world position from the depth texture. I copied
depth_ndc_to_view_z
from view_transformations.wgsl in the bevy_pbr crate, I assume that is correct. Perhaps I am casting the ray from an incorrect origin?Any insights or ideas are greatly appreciated. Thanks, and thanks to everyone for contributing to Bevy!
Beta Was this translation helpful? Give feedback.
All reactions