Open hybridherbst opened 7 months ago
Yeah, these artifacts are inevitable when directly projecting an equirectangular texture onto a sphere geometry. But considering the drawbacks of the previous solution (see https://github.com/mrdoob/three.js/issues/27422#issue-2053326206), I doubt we go back to a based shader approach.
If you are not happy with these artifacts, it's best if you use the previous version as a custom class in your app.
I'm not asking to get the vertex shader back that the previous solution did – the artifacts here could probably be solved with a fragment shader that ignores the UVs, similar to how .background does that.
The new version is much easier to control, geometry-wise. Just the artifacts are bad.
I'm not asking to get the vertex shader back that the previous solution did – the artifacts here could probably be solved with a fragment shader that ignores the UVs, similar to how .background does that.
Even if you just need a custom fragment shader, we end up with a shader material again. Not using ShaderMaterial
was one of the main reasons for going towards GroundedSkybox
, see https://github.com/mrdoob/three.js/issues/27422#issuecomment-1867459020.
Besides, I personally would use GroundedSkybox
with special controls settings (e.g. with a maximum polar angle). In this way, the user never sees the artifact at the top. Depending on the loaded 3D object, the bottom artifact isn't visible as well (like in the example) because it is hidden by the object's geometry.
If GroundedSkybox
gets pulled into core it could probably share the .background shader. Not sure that'll happen though.
Not sure what the consensus is so far regarding the usage of node-based shaders in examples, but GroundedSkybox could probably use a pretty simple node material to fix the seam issue.
Description
The new approach exhibits relatively obvious typical rendering artifacts from "just" sampling a texture on a UVed sphere at the top and bottom:
I think that's why typically a shader is used to sample exact values, instead of relying on UV interpolation to do its thing.
(I understand bringing back a custom shader introduces some of the same complexities on why GroundProjectedSkybox was removed)
cc @elalish
Reproduction steps
Code
-
Live example
-
Version
r161