pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.39k stars 701 forks source link

Environment with ground options has a hole in the middle #1431

Closed aldebout closed 6 days ago

aldebout commented 1 year ago

When using Environment with the ground option, whatever the settings I try, I get a transparent "hole"/artifact in the middle of my camera. By default it is white, if I use the background prop as well I see the background through the hole.

Problem description:

I shouldn't see the artifact.

Relevant code:

Codesandbox reproduction: https://codesandbox.io/s/r3f-env-white-issue-2zm40x

    <Canvas style={{ height: 800, width: 800 }}>
      <Suspense fallback={null}>
        <Environment preset="sunset" ground />
        <PerspectiveCamera makeDefault position={[-30, 100, 120]} fov={35} />
        <OrbitControls />
        <Stats />
      </Suspense>
    </Canvas>

Suggested solution:

Adding a PerspectiveCamera solves the issue (I haven't tried many other things)

drcmda commented 1 year ago

at this point envmap ground comes from three, it used to be a drei feature that was made official. or @FarazzShaikh do you think it can be fixed here?

FarazzShaikh commented 1 year ago

I’m not sure what I’m looking for in the provided sandbox, things look fine to me

however I know a lot more about shaders now, perhaps it’s time to revisit for a better ground projection

aldebout commented 1 year ago

I’m not sure what I’m looking for in the provided sandbox, things look fine to me

My bad, I commented out the camera, it should show the issue now :)

github-actions[bot] commented 1 week ago

Thank you for contributing! We’re marking this issue as stale as a gentle reminder to revisit it and give it the attention it needs to move forward.

Any activity, like adding an update or comment, will automatically remove the stale label so it stays on our radar.

Feel free to reach out on Discord if you need support or feedback from the community. This issue will close automatically soon if there’s no further activity. Thank you for understanding and for being part of the project!

github-actions[bot] commented 6 days ago

We’re closing this issue to keep our project manageable and make room for other active work, but we truly appreciate your effort and contribution.

If you’d like to continue working on this, please feel free to re-open it or reach out on Discord — our community is always ready to support you. Thanks again for helping us stay organized and for understanding our approach!