-
-
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
ShaderChunk: Implemented mipped bicubic transmission texture filtering. #25483
Conversation
Some preliminary performance comparisons on an M1 indicate that the perf hit is negligible - but it may be more noticeable on lower-end devices. If anyone is on an iGPU/Phone, it would be great to see how the performance changes there - as the 7 extra texture reads the shader uses might cost more on such a lower-end platform. |
i have some weak phones , can test if there's live url. This blurring technique could also be used for |
Depends! If the background is an hdri, definitely. I'm not sure how to apply this to cubemaps, however. |
My intuition would say to make the blur mode be choosable by the end dev.
Maybe the only sampler size is enough to specify that? |
Here are a couple of performance test links: https://mrdoob-sandbox.glitch.me/threejs_transmission_r149.html
|
+1 for the change. There are some worthwhile challenges in trying to enable MeshStandardMaterial and MeshPhysicalMaterial to "scale down" to low-end devices better, but I don't think keeping the old transmission texture filtering method around is the right approach to solve that. |
Tested on three devices:
|
Judging by these perf tests, think it is definitely safe to merge :D! |
Description
The current transmission shader technique makes the 0.25-0.75 roughness ranges pretty unusable due to the artefacts.
This PR implements @N8python's shader for sampling the texture using bicubic filtering.
(Left side: bilinear, Right side: bicubic)
Haven't done performance comparisons yet.