From 21354119ccff1f61878c390ccc0d5c343158303c Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 8 Nov 2023 18:10:29 +0100 Subject: REVIEWED: `Makefile.Web`, reorganize and add examples --- examples/shaders/resources/shaders/glsl100/swirl.fs | 2 +- .../shaders/resources/shaders/glsl100/tiling.fs | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 examples/shaders/resources/shaders/glsl100/tiling.fs (limited to 'examples/shaders') diff --git a/examples/shaders/resources/shaders/glsl100/swirl.fs b/examples/shaders/resources/shaders/glsl100/swirl.fs index ec6c6648..7ff401a3 100644 --- a/examples/shaders/resources/shaders/glsl100/swirl.fs +++ b/examples/shaders/resources/shaders/glsl100/swirl.fs @@ -42,5 +42,5 @@ void main() tc += center; vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; - gl_FragColor = vec4(color.rgb, 1.0);; + gl_FragColor = vec4(color.rgb, 1.0); } diff --git a/examples/shaders/resources/shaders/glsl100/tiling.fs b/examples/shaders/resources/shaders/glsl100/tiling.fs new file mode 100644 index 00000000..392786a8 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/tiling.fs @@ -0,0 +1,21 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D diffuseMap; +uniform vec4 tiling; + +// NOTE: Add here your custom variables + +void main() +{ + vec2 texCoord = fragTexCoord*tiling; + fragColor = texture2D(diffuseMap, texCoord); + + gl_FragColor = fragColor; +} -- cgit v1.2.3