asnfjksdll

This commit is contained in:
Tleety
2016-02-12 02:10:01 +01:00
parent 89cbc70177
commit f75f5f2471
7 changed files with 105 additions and 6 deletions
+12 -1
View File
@@ -1,16 +1,27 @@
#version 430
uniform vec2 PickingColor;
layout (binding = 0) uniform sampler2D Texture;
uniform vec4 Color;
uniform vec4 DiffuseColor;
uniform vec2 DiffuseUVRepeat;
in VertexData{
vec3 Position;
vec2 TextureCoord;
}Input;
out vec4 TextureFragment;
void main()
{
TextureFragment = vec4(PickingColor/255, 0, 1);
vec4 diffuseTexel = texture2D(Texture, Input.TextureCoord * DiffuseUVRepeat);
if(Color.a * diffuseTexel.a >= 0.9) {
TextureFragment = vec4(PickingColor/255, 0, 1);
}
}