mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 01:58:25 +00:00
91b0cba145
This fixes a rounding issue on certain hardware (NVidia) which actually implement mediump as half precision (16-bit) float. It's safe to assume `highp` is available as if the GPU does not support it, then the shader compiler will try to find a lower precision that is supported by the GPU
15 lines
254 B
GLSL
15 lines
254 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
layout(location = 0) in vec2 vertex;
|
|
out vec2 uv;
|
|
|
|
uniform vec2 desktopSize;
|
|
uniform mat3x2 transform;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0);
|
|
uv = vertex / desktopSize;
|
|
}
|