X-Git-Url: https://gitweb.ps.run/subsurface_scattering/blobdiff_plain/c99ecda7bed596922125f6b1ef1ef2ae8f27703e..0a5e8172a6ee0e79c81eec21a9966bea9385b249:/shaders/ts_vert_irradiance.glsl diff --git a/shaders/ts_vert_irradiance.glsl b/shaders/ts_vert_irradiance.glsl index afe5645..f0d77b9 100644 --- a/shaders/ts_vert_irradiance.glsl +++ b/shaders/ts_vert_irradiance.glsl @@ -13,7 +13,9 @@ uniform mat4 projection; void main() { - FragPos = vec3(model * vec4(pos, 1.0)); + // lay out the model in the XY-plane according to it's UV coordinates gl_Position = vec4(uv * 2.0 - 1.0, 0.0, 1.0); + // pass fragment position in world coordinates + FragPos = vec3(model * vec4(pos, 1.0)); Normal = normal; }