From 0a5e8172a6ee0e79c81eec21a9966bea9385b249 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 26 Mar 2021 20:12:25 +0100 Subject: comments TS SSS --- shaders/ts_vert_irradiance.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '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; } -- cgit v1.2.3