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

[models] Built-in 3D models are missing vertex normals #4808

Open
fasterik opened this issue Mar 3, 2025 · 0 comments
Open

[models] Built-in 3D models are missing vertex normals #4808

fasterik opened this issue Mar 3, 2025 · 0 comments

Comments

@fasterik
Copy link

fasterik commented Mar 3, 2025

While experimenting with the 3D API and shaders, I discovered that my lighting only works with DrawCube and DrawPlane. Doing a Ctrl+F in rmodels.c confirms that these are the only only functions in that file that call rlNormal3f. It appears that other 3D primitives will reuse the last normal output by a previous draw call. I believe the following functions need to be modified to output vertex normals:

  • DrawCircle3D
  • DrawTriangle3D
  • DrawTriangleStrip3D
  • DrawSphereEx
  • DrawCylinder
  • DrawCylinderEx
  • DrawCapsule
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

1 participant