Move to latest nMage

This commit is contained in:
bloeys
2022-07-03 09:17:59 +04:00
parent 701ee97c66
commit 323cd1099f
10 changed files with 67 additions and 120 deletions

View File

@ -1,22 +0,0 @@
#version 410
in vec4 vertColor;
in vec2 vertUV0;
in vec3 fragPos;
out vec4 fragColor;
uniform sampler2D diffTex;
void main()
{
vec4 texColor = texture(diffTex, vertUV0);
// if (texColor.r == 0)
// {
// fragColor = vec4(0,1,0,0.25);
// }
// else
{
fragColor = vec4(vertColor.rgb, texColor.r);
}
}

View File

@ -1,3 +1,4 @@
//shader:vertex
#version 410
layout(location=0) in vec3 vertPosIn;
@ -27,4 +28,28 @@ void main()
fragPos = vec3(modelMat * vec4(vertPosIn, 1.0));
gl_Position = projViewMat * modelMat * vec4(vertPosIn, 1.0);
}
}
//shader:fragment
#version 410
in vec4 vertColor;
in vec2 vertUV0;
in vec3 fragPos;
out vec4 fragColor;
uniform sampler2D diffTex;
void main()
{
vec4 texColor = texture(diffTex, vertUV0);
// if (texColor.r == 0)
// {
// fragColor = vec4(0,1,0,0.25);
// }
// else
{
fragColor = vec4(vertColor.rgb, texColor.r);
}
}

View File

@ -1,12 +0,0 @@
#version 410
in vec4 vertColor;
in vec2 vertUV0;
in vec3 fragPos;
out vec4 fragColor;
void main()
{
fragColor = vec4(1, 1, 1, 1);
}

View File

@ -1,3 +1,4 @@
//shader:vertex
#version 410
layout(location=0) in vec3 vertPosIn;
@ -19,4 +20,18 @@ void main()
fragPos = vec3(modelMat * vec4(vertPosIn, 1.0));
gl_Position = projViewMat * modelMat * vec4(vertPosIn, 1.0);
}
}
//shader:fragment
#version 410
in vec4 vertColor;
in vec2 vertUV0;
in vec3 fragPos;
out vec4 fragColor;
void main()
{
fragColor = vec4(1, 1, 1, 1);
}

View File

@ -1,13 +0,0 @@
#version 410
uniform sampler2D Texture;
in vec2 Frag_UV;
in vec4 Frag_Color;
out vec4 Out_Color;
void main()
{
Out_Color = vec4(Frag_Color.rgb, Frag_Color.a * texture(Texture, Frag_UV.st).r);
}

View File

@ -1,19 +0,0 @@
#version 410
uniform mat4 ProjMtx;
in vec3 Position;
in vec3 Normal;
in vec2 UV;
in vec4 Color;
out vec2 Frag_UV;
out vec4 Frag_Color;
void main()
{
Frag_UV = UV;
Frag_Color = vec4(1,1,1,1);
Frag_Color = Color;
gl_Position = ProjMtx * vec4(Position.xy, 0, 1);
}