-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve CLEAR_MODES docs #7075
Improve CLEAR_MODES docs #7075
Conversation
@ivanpopelyshev BLIT mode doesn't not clear only the filtering area on the texture right now. If that was the intended purpose, we need to fix it. |
I find this doc change not particularly useful or legible. This need some editing for clarity. |
Codecov Report
@@ Coverage Diff @@
## dev #7075 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 699 699
=========================================
Hits 699 699 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bigtimebuddy, I had a chat with @ivanpopelyshev and we cleared up (get it?) what CLEAR_MODES.BLIT
should be doing. It basically skips clearing the filter texture if the filter has state.blend = false
- as that will overwrite pixels anyway. Setting forceClear
on the FilterSystem
will make this mode clear regardless of the blend mode. That flag may be used in the future to force clearing on devices where that operation makes things faster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub has a bug :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
Thank you @SukantPal and @ivanpopelyshev for making this better. |
As discussed with @SukantPal , I have to clarify this once more.
Most people that write filters dont know about clamping and other tricks that are needed in case we use pow2 temporary renderTextures. Even our
BlurFilter
is affected, @GoodBoyDigital wrote this version for v5 :)For them, we distinguish two clearing modes - one
CLEAR
that clears everything, and secondBLIT
that just overwrites new content over texture, and leaves right and bottom zone as it was.