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

problem with inputs in #18 - Lighting 2 #108

Closed
fenomas opened this issue Nov 2, 2014 · 0 comments
Closed

problem with inputs in #18 - Lighting 2 #108

fenomas opened this issue Nov 2, 2014 · 0 comments
Labels

Comments

@fenomas
Copy link

fenomas commented Nov 2, 2014

For problem 18 (light 2 - diffuse lighting), the sample code given to the user declares:

attribute vec4 position, normal;

However, the "correct" implementation in the source code declares

attribute vec3 position, normal;

and than packs those vectors into vec4 values by appending 1.0 to position and 0.0 to normal.

Being entirely new to GLSL, I don't know which version is intended. I was able to get my code to pass by following the source and overwriting the w component of those two vectors, but I have no idea why that was necessary, and I don't see how anyone new to GLSL could pass this without checking the answers.

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

No branches or pull requests

2 participants