September 2018
Intermediate to advanced
472 pages
15h 36m
English
To create a shader program that can be used to render point primitives as quads, use the following steps:
layout (location = 0) in vec3 VertexPosition;uniform mat4 ModelViewMatrix;void main(){ gl_Position = ModelViewMatrix * vec4(VertexPosition,1.0);}
layout( points ) in; layout( triangle_strip, max_vertices = 4 ) out; uniform float Size2; // Half the width of the quad uniform mat4 ProjectionMatrix; ...
Read now
Unlock full access