Cleanup shaders
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#version 450 core
|
||||
layout(location = 0) in vec2 pos;
|
||||
layout(location = 1) in vec2 texPos;
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
|
||||
out vec2 vTexPos;
|
||||
void main() {
|
||||
gl_Position = vec4(pos, 0.0, 1.0);
|
||||
vTexPos = texPos;
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw;
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ void main()
|
||||
{
|
||||
fCol = vCol;
|
||||
fPos = vPos;
|
||||
fNorm = vNorm ;
|
||||
fNorm = vNorm;
|
||||
}
|
||||
|
||||
@@ -12,16 +12,3 @@ void main() {
|
||||
vNorm = unpackSnorm4x8(data[indices[gl_VertexID]].norm);
|
||||
gl_Position = theMat * vec4(vPos.xyz,1);
|
||||
}
|
||||
//layout (location = 0) in vec4 pos;
|
||||
//layout (location = 1) in vec4 col;
|
||||
//layout (location = 2) in vec4 norm;
|
||||
//layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
//out vec4 vCol;
|
||||
//out vec4 vPos;
|
||||
//out vec4 vNorm;
|
||||
//void main() {
|
||||
// gl_Position = theMat * vec4(pos.xyz,1);
|
||||
// vCol = col;
|
||||
// vPos = pos;
|
||||
// vNorm = norm;
|
||||
//}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec2 pos;
|
||||
layout (location = 1) in vec2 texPos;
|
||||
uniform vec2 winSize;
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
|
||||
out vec2 vTexPos;
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(pos,0,1);
|
||||
vTexPos = texPos;
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user