Use vertex pulling for ceiling stencil
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 poss;
|
||||
//layout (location = 0) in vec4 poss;
|
||||
//void main()
|
||||
//{
|
||||
// gl_Position = poss;
|
||||
//}
|
||||
struct PosTex { vec4 pospos; vec4 texang; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 2) readonly buffer Pos { PosTex data[]; };
|
||||
int indices[6] = {0,1,3,0,3,2};
|
||||
void main()
|
||||
{
|
||||
gl_Position = poss;
|
||||
vec4 pp = data[gl_VertexID / 6].pospos;
|
||||
int j = indices[gl_VertexID % 6];
|
||||
float z = (j > 1.5 ? 5000 : 100);
|
||||
vec2 xy = (j % 2 > 0 ? pp.xy : pp.zw);
|
||||
gl_Position = theMat * vec4(xy,z,1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user