-
Notifications
You must be signed in to change notification settings - Fork 349
Revert "Draw pen lines via fragment shader" #559
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
Conversation
Keep me updated! What test project is that? |
I think this is go to random position? I don't think it was doing that when I tested it |
This looks more like fencing behavior to me. I'm not sure what problem @BryceLTaylor is referring to in the above screenshot, but I can reproduce something similar-looking on this project: Of course, the sprite's rotation center is waaaay off, so it's to be expected that the top and left sides of the stage aren't getting touched: It doesn't seem like the pen skin is getting incorrectly moved or the lines aren't being drawn in the right place-- all the lines are connected, and they never go off the right or bottom edges of the stage. The only other issue I see in that screenshot is that some of the pen lines look "dashed": but that's a problem with nearest-neighbor interpolation that existed long before my PR was merged. |
That makes sense about the fencing behavior. Do you happen to know what might cause the "problem with nearest-neighbor interpolation"? I agree it seems unlikely it's your PR. |
Sorry--by that I meant that the problem is nearest-neighbor interpolation. The I can think of three ways to fix this:
|
This is the project on production that was having the fencing issue: https://scratch.mit.edu/projects/371983393/ It also demonstrated the skinny lines appearing to be dashed problem, which even if it's caused by existing issues, we should not implement anything that reveals it. |
Are you sure the fencing bug is related to my PR? I ran your test project under the "pen shader" branch and found no such issue: Regarding pen lines appearing "dashed", IMO they appear only slightly worse in my PR--here's what they look like currently: I'd prefer to avoid blocking this on a nearest-neighbor fix, as I'm concerned it would take another few months to get that merged in (which is completely understandable given your current workload, but something I'd rather not hold up this PR on). Once a Scratch Team member can provide input on which of these three options should be implemented in order to fix the scaling artifacts, I'd be happy to create another PR. |
Alright @BryceLTaylor, I think I may have found the source of the fencing issue. If you draw an off-center costume, the rotation center and bounds are updated as expected and fencing occurs. If, however, you then delete the contents of the costume, fencing incorrectly continues to be applied using the previous costume contents until you reload: Thus, you ran into this bug if you performed the following set of steps:
|
Reverts #438

Bryce found some issues with pen that we're investigating