-
Notifications
You must be signed in to change notification settings - Fork 336
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
Fix texture sampling calculations for CPU pipeline #479
Open
adroitwhiz
wants to merge
10
commits into
scratchfoundation:develop
Choose a base branch
from
adroitwhiz:int-touching-bounds
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix texture sampling calculations for CPU pipeline #479
adroitwhiz
wants to merge
10
commits into
scratchfoundation:develop
from
adroitwhiz:int-touching-bounds
Commits on Mar 3, 2024
-
test: make touching-color test more robust against GPU imprecision
Previously, the `color-touching-tests.sb2` test "touches a color that doesn't actually exist right now" would use a sprite with ghost 50, blended against another sprite, to create the color that "doesn't actually exist" when the query sprite is skipped. Unfortunately the blend result was near a bit-boundary and, depending on the specific hardware used, that test could fail on the GPU. When the renderer uses the CPU path this test works fine, though, so the existing problem went unnoticed. To fix the problem I changed the project to use ghost 30 instead, which results in a color that is less near a bit boundary and is therefore less likely to fail on specific hardware. As an example of what was happening: the `touching color` block was checking for `RGB(127,101,216)` with a mask of `RGB(0xF8,0xF8,0xF0)`. On the CPU it would find `RGB(120,99,215)`, which is in range, but on some GPUs the closest color it could find was `RGB(119,98,215)` which mismatches on all four of the least significant bits -- one of which is enabled in the mask.
Configuration menu - View commit details
-
Copy full SHA for 6cadd0b - Browse repository at this point
Copy the full SHA 6cadd0bView commit details -
fix: adjust CPU isTouchingColor to match GPU results
Fix direction for Y iteration on CPU path For some reason the JavaScript engine insists on running the code instead of doing what the comment says. I guess they should match. Fix (x,y) => point[] conversion comments
Configuration menu - View commit details
-
Copy full SHA for 35c9b7a - Browse repository at this point
Copy the full SHA 35c9b7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 73864f3 - Browse repository at this point
Copy the full SHA 73864f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9514d3b - Browse repository at this point
Copy the full SHA 9514d3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1dec5a7 - Browse repository at this point
Copy the full SHA 1dec5a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1918b4 - Browse repository at this point
Copy the full SHA f1918b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0ef5e9 - Browse repository at this point
Copy the full SHA b0ef5e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for be15f20 - Browse repository at this point
Copy the full SHA be15f20View commit details -
fix: fix cpu-render.html coordinate space
This should ensure that CPU/GPU diffs are actually useful, and not improperly shifted.
Configuration menu - View commit details
-
Copy full SHA for 0554ed7 - Browse repository at this point
Copy the full SHA 0554ed7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37a0fa0 - Browse repository at this point
Copy the full SHA 37a0fa0View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.