summaryrefslogtreecommitdiffhomepage
path: root/examples/web/text/resources/shaders
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-10-17 21:02:18 +0200
committerraysan5 <[email protected]>2021-10-17 21:02:18 +0200
commit35e67da08e3d214589968c19b4b2fb31d8e566cc (patch)
tree5054bcea5f6df754f467590101789b17dd9d9944 /examples/web/text/resources/shaders
parentb2228039039afc05c41edd12103123f2a36c8080 (diff)
downloadraylib.com-35e67da08e3d214589968c19b4b2fb31d8e566cc.tar.gz
raylib.com-35e67da08e3d214589968c19b4b2fb31d8e566cc.zip
UPDATED: examples to raylib 4.0
Some new examples added
Diffstat (limited to 'examples/web/text/resources/shaders')
-rw-r--r--examples/web/text/resources/shaders/glsl100/sdf.fs25
-rw-r--r--examples/web/text/resources/shaders/glsl330/sdf.fs26
2 files changed, 0 insertions, 51 deletions
diff --git a/examples/web/text/resources/shaders/glsl100/sdf.fs b/examples/web/text/resources/shaders/glsl100/sdf.fs
deleted file mode 100644
index 31323d9..0000000
--- a/examples/web/text/resources/shaders/glsl100/sdf.fs
+++ /dev/null
@@ -1,25 +0,0 @@
-#version 100
-
-precision mediump float;
-
-// Input vertex attributes (from vertex shader)
-varying vec2 fragTexCoord;
-varying vec4 fragColor;
-
-// Input uniform values
-uniform sampler2D texture0;
-uniform vec4 colDiffuse;
-
-// NOTE: Add here your custom variables
-const float smoothing = 1.0/16.0;
-
-void main()
-{
- // Texel color fetching from texture sampler
- // NOTE: Calculate alpha using signed distance field (SDF)
- float distance = texture2D(texture0, fragTexCoord).a;
- float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance);
-
- // Calculate final fragment color
- gl_FragColor = vec4(fragColor.rgb, fragColor.a*alpha);
-}
diff --git a/examples/web/text/resources/shaders/glsl330/sdf.fs b/examples/web/text/resources/shaders/glsl330/sdf.fs
deleted file mode 100644
index 44d33e9..0000000
--- a/examples/web/text/resources/shaders/glsl330/sdf.fs
+++ /dev/null
@@ -1,26 +0,0 @@
-#version 330
-
-// Input vertex attributes (from vertex shader)
-in vec2 fragTexCoord;
-in vec4 fragColor;
-
-// Input uniform values
-uniform sampler2D texture0;
-uniform vec4 colDiffuse;
-
-// Output fragment color
-out vec4 finalColor;
-
-// NOTE: Add here your custom variables
-const float smoothing = 1.0/16.0;
-
-void main()
-{
- // Texel color fetching from texture sampler
- // NOTE: Calculate alpha using signed distance field (SDF)
- float distance = texture(texture0, fragTexCoord).a;
- float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance);
-
- // Calculate final fragment color
- finalColor = vec4(fragColor.rgb, fragColor.a*alpha);
-}