diff options
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; +} |
