https://github.com/NSchertler/GeneralizedMotorcycleGraph
Revision 16a6ae64d8f7efb681a6292569f0935fc909799f authored by Nico Schertler on 09 July 2018, 12:30:22 UTC, committed by Nico Schertler on 09 July 2018, 12:30:22 UTC
1 parent 365534a
Tip revision: 16a6ae64d8f7efb681a6292569f0935fc909799f authored by Nico Schertler on 09 July 2018, 12:30:22 UTC
minor changes
minor changes
Tip revision: 16a6ae6
mesh_colors_quad.tcs
#version 430
layout (vertices = 4) out;
uniform int R;
struct QuadData
{
vec2 cornerTexCoords[4];
vec2 texCoords[9];
uint cPtr;
};
layout(std430, binding = 0) buffer quadData
{
QuadData quads[];
};
out TCS_OUT
{
vec2 pos;
} vertex[];
patch out uint quadId;
void main(void)
{
int quadIdx = gl_PrimitiveID;
int vIdx = gl_InvocationID;
QuadData quad = quads[quadIdx];
vertex[gl_InvocationID].pos = quad.cornerTexCoords[gl_InvocationID];
quadId = quadIdx;
gl_TessLevelOuter[0] = R;
gl_TessLevelOuter[1] = R;
gl_TessLevelOuter[2] = R;
gl_TessLevelOuter[3] = R;
gl_TessLevelInner[0] = R;
gl_TessLevelInner[1] = R;
}
Computing file changes ...