Change CurveModifier splineTexture filtering to Linear for smoother path #28375
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.
Related issue: #28376
A clear and concise description of what the problem was and how this pull request solves it.
In the CurveModifier examples there is a lot of jitter and distortionwhen meshes go around the sharper curves:
In the:
https://threejs.org/examples/?q=curve#webgl_modifier_curve_instanced
and:
https://136.24.178.125/three.js/examples/webgl_modifier_curve.html
examples, you can see shimmering as the text instances are curved along their paths around corners.
This is because the splineTexture magFilter is explicitly set to NearestFilter instead of LinearFilter , causing snapping in the splineTexture sampling.
This PR changes the default splineTexture .magFiltering to LinearFiltering to fix this issue.
Here is a glitch that allows changing the magFilter between Linear and Nearest to show the issue:
https://atlantic-warp-sweater.glitch.me/
This contribution is funded by Example