mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Move to latest nMage
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user