diff options
| author | Ray <[email protected]> | 2023-11-08 18:10:29 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-11-08 18:10:29 +0100 |
| commit | 21354119ccff1f61878c390ccc0d5c343158303c (patch) | |
| tree | 0cebf2b81ae93fe66a47afa40d24f2c0d82a9b64 /examples/shaders | |
| parent | bd3ffa7db3f3f52e075811288de6aae5eb920701 (diff) | |
| download | raylib-21354119ccff1f61878c390ccc0d5c343158303c.tar.gz raylib-21354119ccff1f61878c390ccc0d5c343158303c.zip | |
REVIEWED: `Makefile.Web`, reorganize and add examples
Diffstat (limited to 'examples/shaders')
| -rw-r--r-- | examples/shaders/resources/shaders/glsl100/swirl.fs | 2 | ||||
| -rw-r--r-- | examples/shaders/resources/shaders/glsl100/tiling.fs | 21 |
2 files changed, 22 insertions, 1 deletions
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; +} |
