\r
void main()\r
{\r
- FragPos = vec3(model * vec4(pos, 1.0));\r
+ // lay out the model in the XY-plane according to it's UV coordinates\r
gl_Position = vec4(uv * 2.0 - 1.0, 0.0, 1.0);\r
+ // pass fragment position in world coordinates\r
+ FragPos = vec3(model * vec4(pos, 1.0));\r
Normal = normal;\r
}\r