Fixed blendmaps

Merge remote-tracking branch 'origin/gui' into deffered_rendering

Conflicts:
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
Tleety
2014-05-28 22:08:50 +02:00
21 changed files with 932 additions and 1201 deletions
+5 -5
View File
@@ -58,11 +58,11 @@ float Shadow(vec4 ShadowCoord, vec3 normal)
void main()
{
vec4 BlendMap = texture2D(DiffuseTexture, Input.TextureCoord.st);
vec4 BlendMap = texture(DiffuseTexture, Input.TextureCoord);
vec4 TextureRedTexel = texture2D(TextureRed, Input.TextureCoord.st * TextureRepeats);
vec4 TextureGreenTexel = texture2D(TextureGreen, Input.TextureCoord.st * TextureRepeats);
vec4 TextureBlueTexel = texture2D(TextureBlue, Input.TextureCoord.st * TextureRepeats);
vec4 TextureRedTexel = texture(TextureRed, Input.TextureCoord * TextureRepeats);
vec4 TextureGreenTexel = texture(TextureGreen, Input.TextureCoord * TextureRepeats);
vec4 TextureBlueTexel = texture(TextureBlue, Input.TextureCoord * TextureRepeats);
//Mix the Terrain-textures together
TextureRedTexel *= BlendMap.r;
@@ -79,7 +79,7 @@ void main()
//frag_Normal = vec4(Input.Normal, 0.0);
// Diffuse Texture
frag_Diffuse = finalBlendTexel * Shadow(Input.ShadowCoord, vec3(frag_Normal));
frag_Diffuse = finalBlendTexel;
//G-buffer Specular
frag_Specular = texture(SpecularMapTexture, Input.TextureCoord);
+3 -1
View File
@@ -1,5 +1,7 @@
#version 430
uniform vec4 Color;
layout(binding=0) uniform sampler2D texture0;
in VertexData {
@@ -14,5 +16,5 @@ void main() {
// Texture
vec4 texel = texture(texture0, Input.TextureCoord);
fragmentColor = texel;
fragmentColor = texel * Color;
}