Skip to content
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

Grass shader bug #81

Closed
hichemfantar opened this issue Aug 22, 2024 · 8 comments
Closed

Grass shader bug #81

hichemfantar opened this issue Aug 22, 2024 · 8 comments

Comments

@hichemfantar
Copy link

hichemfantar commented Aug 22, 2024

https://github.com/pmndrs/examples/tree/main/demos/grass-shader

there's a bug with the grass shader example where the grass isn't rendered on certain camera angles

2024-08-22.16-25-07.mp4

fixed by #82

@abernier
Copy link
Member

I cannot reproduce on my setup (macos 15 m1 / Chrome latest)

@hichemfantar
Copy link
Author

hichemfantar commented Aug 22, 2024

I cannot reproduce on my setup (macos 15 m1 / Chrome latest)

i can reproduce, both on windows 10 and macos sonoma, and mobile android and ios.
try different angles and camera positions

@abernier
Copy link
Member

abernier commented Aug 22, 2024

even on different camera angles/positions

@abernier
Copy link
Member

can you create a PR to fix it?

@hichemfantar
Copy link
Author

setting frustumCulled={false} fixes it but im not sure it's a real fix

@isaac-mason
Copy link
Member

isaac-mason commented Aug 25, 2024

You can reproduce it by positioning the camera not to look at the center of the grass.

The grass geometry needs a bounding sphere manually set as the grass blades are positioned in the shader using the "offset" attribute.

image

@hichemfantar
Copy link
Author

thanks for the fix @isaac-mason

@isaac-mason
Copy link
Member

isaac-mason commented Aug 27, 2024

No worries! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants