treesummaryrefslogcommitdiff
path: root/shaders/ts_vert_irradiance.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/ts_vert_irradiance.glsl')
-rw-r--r--shaders/ts_vert_irradiance.glsl4
1 files changed, 3 insertions, 1 deletions
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;
}