-
-
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
TSL: Introduce viewportSafeUV()
#29025
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
I'm not sure if it will be easy to solve some of these details, maybe it will need a spatial and temporal approach. It is possible to see some of these flaws in some popular games too, since they use similar approaches. It could be less noticeable by reducing the strength of normal too. We have to consider that the materials currently with Not that this should be good news, but maybe something our users aren't caring about as much, I think. // Using WebGLRenderer
const planeRefractor = new THREE.Mesh( planeGeo, new THREE.MeshPhysicalMaterial() );
planeRefractor.material.transparent = true;
planeRefractor.material.transmission = 1;
planeRefractor.material.roughness = .5; refraction.-.Google.Chrome.2024-07-31.02-56-32.mp4 |
I see I see... I guess we just need to update the example so it doesn't show the artifact. |
@@ -126,7 +126,7 @@ | |||
|
|||
// renderer | |||
|
|||
renderer = new THREE.WebGPURenderer( { antialias: true } ); | |||
renderer = new THREE.WebGPURenderer( /*{ antialias: true }*/ ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunag I have to disable also antialias for the example to work as well. Can you provide me context on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I did is set the antiAlias to false like here and handle the pixel density manually in the ctx:
const context = ref.current!.getContext("webgpu")!;
const canvas = context.canvas;
canvas.width = canvas.clientWidth * PixelRatio.get();
canvas.height = canvas.clientHeight * PixelRatio.get();
let me know if you have any thoughts on this.
Related issue: #28761 (comment)
Description
viewportSafeUV()
is a safe uv function for refraction purposes