Add WebGL compatibility
This commit is contained in:
parent
3725f56c78
commit
1d4980ae28
29 changed files with 567 additions and 212 deletions
15
src/graphics/rendering/shaders/distance-vs-100.glsl
Normal file
15
src/graphics/rendering/shaders/distance-vs-100.glsl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 100
|
||||
|
||||
precision lowp float;
|
||||
|
||||
uniform mat3 modelTransform;
|
||||
uniform vec2 squareToAspectRatio;
|
||||
|
||||
attribute vec4 vertexPosition;
|
||||
varying vec2 position;
|
||||
|
||||
void main() {
|
||||
vec3 vertexPosition2D = vec3(vertexPosition.xy, 1.0) * modelTransform;
|
||||
gl_Position = vec4(vertexPosition2D.xy, 0.0, 1.0);
|
||||
position = vertexPosition2D.xy * squareToAspectRatio;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue