forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skybox.wgsl: Fix precision issues (bevyengine#9909)
# Objective - Fixes bevyengine#9707 ## Solution - At large translations (a few thousand units), the precision of calculating the ray direction from the fragment world position and camera world position seems to break down. Sampling the cubemap only needs the ray direction. As such we can use the view space fragment position, normalise it, rotate it to world space, and use that. --- ## Changelog - Fixed: Jittery skybox at large translations.
- Loading branch information
Showing
1 changed file
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters