-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow post-process materials to update the vertex position
we add a `position` field to PostProcessVertexInputs which the user code can modify if needed.
- Loading branch information
1 parent
111ad96
commit dedf276
Showing
3 changed files
with
18 additions
and
17 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,11 +1,4 @@ | ||
/** @public-api */ | ||
vec4 getPosition() { | ||
vec4 pos = position; | ||
|
||
// In Vulkan, clip space is Y-down. In OpenGL and Metal, clip space is Y-up. | ||
#if defined(TARGET_VULKAN_ENVIRONMENT) | ||
pos.y = -pos.y; | ||
#endif | ||
|
||
return pos; | ||
return position; | ||
} |
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