1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
<STRUCTURE>
<LAYOUT>
layout(triangles, invocations = 3) in;
layout(line_strip, max_vertices = 6) out;
<UNIFORM>
<VARIABLE_IN>
vec4 position_model;
vec4 normal_model;
<VARIABLE_OUT>
<FUNCTION>
<OPERATION>
gl_Position = MVP * inData[0].position_model;
EmitVertex();
gl_Position = MVP * vec4((inData[0].position_model.xyz + inData[0].normal_model.xyz),1);
EmitVertex();
EndPrimitive();
gl_Position = MVP * inData[1].position_model;
EmitVertex();
gl_Position = MVP * vec4((inData[1].position_model.xyz + inData[1].normal_model.xyz),1);
EmitVertex();
EndPrimitive();
gl_Position = MVP * inData[2].position_model;
EmitVertex();
gl_Position = MVP * vec4((inData[2].position_model.xyz + inData[2].normal_model.xyz),1);
EmitVertex();
EndPrimitive(); |
Partager