Change CurveModifier splineTexture filtering to Linear for smoother path#28375
Change CurveModifier splineTexture filtering to Linear for smoother path#28375Mugen87 merged 1 commit intomrdoob:devfrom
Conversation
|
Indeed, much smoother! |
|
I think If users have to support incompatible hardware, they can still set the filtering via the flow.splineTexure.magFilter = THREE.NearestFilter; |
|
One possible improvement would be to use a half float texture in Linear filtering half float textures always works in WebGL 2. |
|
BTW: Why is only |
I saw that but I wasn't clear on the semantics of using LinearFilter for minFilter.. But I think its valid.. so lgtm? |
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