Add WebGL compatibility
This commit is contained in:
parent
3725f56c78
commit
1d4980ae28
29 changed files with 567 additions and 212 deletions
23
src/graphics/rendering/shaders/distance-fs-100.glsl
Normal file
23
src/graphics/rendering/shaders/distance-fs-100.glsl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#version 100
|
||||
|
||||
precision lowp float;
|
||||
|
||||
#define SURFACE_OFFSET 0.001
|
||||
|
||||
uniform float maxMinDistance;
|
||||
uniform float distanceNdcPixelSize;
|
||||
varying vec2 position;
|
||||
|
||||
{macroDefinitions}
|
||||
|
||||
{declarations}
|
||||
|
||||
void main() {
|
||||
float minDistance = maxMinDistance;
|
||||
float color = 0.0;
|
||||
|
||||
{functionCalls}
|
||||
|
||||
// minDistance / 2.0: NDC to UV scale
|
||||
gl_FragColor = vec4(minDistance / 2.0, color, 0.0, 0.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue