-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Examples: Fix raycasting in webgl_lines_fat_raycasting
example.
#23690
Conversation
I'm not sure I understand this fix - the resolution is set on the frame rate, so assuming the window size didn't change why won't this be identical to the previous code up to the 1st frame? Either way awesome! seems like it's working well now, crossing this off my todo list :) Note: |
The render resolution on the material is set twice -- once for the main render and once for the subframe render. It needs to be set for the main render size again before checking intersections otherwise it's left at the previous subframe state. |
Do we need the subframe in this example? 🤔 |
I had the same concern: #23358 (comment) |
I don't have strong opinions about whether or not it should be in the example. I can remove it if you want. |
Sorry to bring this up again, but I still suspect a bug with the raycasting+worldwidth lines+camera near combo Screen.Recording.2022-03-10.at.18.51.50.movI should've opened a ticket after the merge to dev - without this example it will be harder to debug and reproduce Partially discussed here: Can't really formulate my issue at the moment - I'll need more time to isolate what I think is buggy here Also: |
@mrdoob aside from whether the subframe should be in the example I think this should be merged. Right now the example looks broken. If we'd like to update it to remove the picture-in-picture we can do that in another PR. |
webgl_lines_fat_raycasting
example.
Related issue: #23358 (comment)
Description
Adjust where the line material resolution is set so the raycast result is correct. Previously the material resolution was being set after the raycast occurred meaning the line width was incorrect during the raycast.
BEFORE
https://raw.githack.com/mrdoob/three.js/f35120c9083ce31f1994575cef075357bc98f53d/examples/webgl_lines_fat_raycasting.html
AFTER
https://raw.githack.com/mrdoob/three.js/fix-fat-lines-raycast/examples/webgl_lines_fat_raycasting.html
cc @bergden-resonai