-
-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix view dir in ortho projection (#1962)
* fix: view dir in ortho projection
- Loading branch information
Showing
4 changed files
with
20 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#ifdef MATERIAL_NEED_WORLD_POS | ||
vec3 V = normalize( camera_Position - v_pos ); | ||
#endif | ||
#ifdef CAMERA_ORTHOGRAPHIC | ||
vec3 V = -camera_Forward; | ||
#else | ||
#ifdef MATERIAL_NEED_WORLD_POS | ||
vec3 V = normalize( camera_Position - v_pos ); | ||
#endif | ||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
uniform vec3 camera_Position; | ||
uniform vec3 camera_Position; | ||
uniform vec3 camera_Forward; |
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