mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-02-26 04:55:38 +00:00

gl_Position is expected to be using homogeneous coordinates, which requires w to be a coordinate scale factor, usually 1.0. z should also be set in order for depth to be well-defined. Therefore, we should set gl_Position.zw to vec2(0.0, 1.0).
14 lines
216 B
GLSL
14 lines
216 B
GLSL
#version 300 es
|
|
|
|
precision mediump float;
|
|
|
|
layout(location = 0) in vec2 uVertex;
|
|
layout(location = 1) in vec2 uUV;
|
|
|
|
out vec2 iFragCoord;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(uVertex, 0.0, 1.0);
|
|
iFragCoord = uUV;
|
|
}
|