-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stencil Additions #242
base: main
Are you sure you want to change the base?
Stencil Additions #242
Conversation
The results using stencil test for planar reflection show performance gain, especially on our weaker laptop targets for the game :) |
One thing that caught me was that the
|
Motivation
We want to use stencil tests to optimize part of our planar reflection rendering
Added Texture Formats
API Additions
Added
set_stencil_reference(&mut self, reference: u32)
toRenderEncoder
traitBoth metal, gles and vulkan support setting it for front and back faces individually, but from what I could find metal only supports setting them both at the same time.
I decided to simply set front and back to same value for now. Could be solved by requiring both be specified as a
front_reference: u32
andback_reference: u32
. Skipped for nowMetal
Noticed that metal wasn't doing anything with the stencil load/clear ops so implemented those while peeking at
wpgu-hal
implementationTesting
Tested and inspected in vulkan. Gles compiles on linux. Macos compiles and runs.