pmndrs / drei

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

Bad Quality Drei Environment HDRI files #461

Closed him666 closed 6 days ago

him666 commented 3 years ago

Problem description:

environment hdri files resolution is being downscaled.

Relevant code:

<Environment
            files={'/environments/preset.hdr'} 
            background
          />

Suggested solution:

adding prop to receive resolution res="1k" or 256, 512 whatever suits better

<Environment
            files={'/environments/preset.hdr'} 
            background
            resolution={512}
          />
joshuaellis commented 3 years ago

Thanks @him666 feel free to make a PR for this!

magicspon commented 2 years ago

Any updates on this... the difference is quite shocking: r3f: https://eq-site-c0nedilrs-spon.vercel.app/demo vanilla: https://mango-dentists.surge.sh/

gsimone commented 2 years ago

@magicspon are you using the same type of generator for the vanilla demo? Do you want to share the code so we can see what's different?

gsimone commented 2 years ago

Note that the Environment component is meant to generate a cube texture for environmental lighting, not to use as a cube background. The texture generated from the PMREMGenerator is always 256x256 https://threejs.org/docs/#api/en/extras/PMREMGenerator

drcmda commented 2 years ago

i think for envmap lighting it makes sense to keep resolution as low as possible, as @gsimone said, we just use prem. there should be zero difference between vanilla and r3f if you use the same means to get your environment. but maybe environment can be extended with a resolution prop and then not use prem? but i know too little about it, three has changed drastically in that area and i didnt keep up.

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!