You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
For problem 18 (light 2 - diffuse lighting), the sample code given to the user declares:
However, the "correct" implementation in the source code declares
and than packs those vectors into vec4 values by appending
1.0
toposition
and0.0
tonormal
.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.The text was updated successfully, but these errors were encountered: