Working shadows, however ugly they are.

This commit is contained in:
Tleety
2014-05-12 18:03:39 +02:00
parent d9ca9ac1f7
commit 4639a6e4c3
8 changed files with 136 additions and 55 deletions
+5
View File
@@ -5,6 +5,7 @@ uniform float Gamma;
layout (binding=0) uniform sampler2D DiffuseTexture;
layout (binding=1) uniform sampler2D LightingTexture;
layout (binding=2) uniform sampler2D ShadowTexture;
in VertexData
{
@@ -18,7 +19,11 @@ void main()
{
vec4 DiffuseTexel = texture(DiffuseTexture, Input.TextureCoord);
vec4 LightingTexel = texture(LightingTexture, Input.TextureCoord);
vec4 ShadowTexel = texture(ShadowTexture, Input.TextureCoord);
vec4 _FragmentColor = DiffuseTexel * vec4(La, 1.0) + LightingTexel;
FragmentColor = vec4(pow(_FragmentColor.rgb, vec3(1.0 / Gamma)), _FragmentColor.a);
//FragmentColor = ShadowTexel;
}