]> gitweb.ps.run Git - subsurface_scattering/blobdiff - shaders/ts_vert_irradiance.glsl
add PDF and exes
[subsurface_scattering] / shaders / ts_vert_irradiance.glsl
index afe5645a64298937bf91d3d413e71a830d0fdc49..f0d77b9f8a840c49b5bf56bbffa06c511c0bf40e 100644 (file)
@@ -13,7 +13,9 @@ uniform mat4 projection;
 \r
 void main()\r
 {\r
 \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
   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
   Normal = normal;\r
 }\r