diff --git a/shader/picture/charArray.frag b/shader/picture/charArray.frag new file mode 100644 index 000000000..a829e327b --- /dev/null +++ b/shader/picture/charArray.frag @@ -0,0 +1,9 @@ +#version 450 core +layout (location=0) out vec4 fColor; +layout (binding=50) uniform sampler2DArray thetexture; +in vec4 vColor; +in vec3 vTexCoord; +void main() +{ + fColor = texture(thetexture, vec3 (vTexCoord.xyz)) * vColor; +} diff --git a/shader/picture/charArray.vert b/shader/picture/charArray.vert new file mode 100644 index 000000000..27146b61f --- /dev/null +++ b/shader/picture/charArray.vert @@ -0,0 +1,13 @@ +#version 450 core +layout (location = 0) in vec3 inPos; +layout (location = 1) in vec4 inColor; +layout (location = 2) in vec4 inTexCoord; +layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ; +out vec4 vColor; +out vec3 vTexCoord; +void main() +{ + gl_Position = theMat * vec4(inPos.xyz, 1.0); + vColor = inColor; + vTexCoord = inTexCoord.xyz; +}