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

Inverted Normals using PointLight #43

Closed
ghost opened this issue Jul 19, 2015 · 1 comment
Closed

Inverted Normals using PointLight #43

ghost opened this issue Jul 19, 2015 · 1 comment
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Jul 19, 2015

The normals when lighting the 3D cube example posted here are inverted for the left, top, and back faces.

Error in Lighting

@sriharshachilakapati sriharshachilakapati added this to the 0.0.4a milestone Jul 19, 2015
@sriharshachilakapati sriharshachilakapati self-assigned this Jul 19, 2015
@sriharshachilakapati
Copy link
Owner

The issue here is the winding order of the generated vertices of the cube faces. The vertices of the top, left and front faces are specified in clock wise order, while the others are specified in counter clock wise order. Fixing that got me the correct results now.

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

No branches or pull requests

1 participant