diff options
| author | Patrick | 2021-03-26 20:12:25 +0100 |
|---|---|---|
| committer | Patrick | 2021-03-26 20:12:25 +0100 |
| commit | 0a5e8172a6ee0e79c81eec21a9966bea9385b249 (patch) | |
| tree | 64b7f94af72ed0d57f3ea769bc14fa01702e20e5 /shaders/ts_vert_irradiance.glsl | |
| parent | c99ecda7bed596922125f6b1ef1ef2ae8f27703e (diff) | |
| download | subsurface_scattering-0a5e8172a6ee0e79c81eec21a9966bea9385b249.tar.gz subsurface_scattering-0a5e8172a6ee0e79c81eec21a9966bea9385b249.zip | |
comments TS SSS
Diffstat (limited to 'shaders/ts_vert_irradiance.glsl')
| -rw-r--r-- | shaders/ts_vert_irradiance.glsl | 4 |
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;
}
|
