Last active
November 14, 2020 12:58
-
-
Save lucasvanmol/0c4a74cecb2b4cbcd2dd482347ebb871 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shader_type canvas_item; | |
| uniform float STRENGTH = 0.0; | |
| uniform vec2 CENTER = vec2(0.5); | |
| void fragment() { | |
| vec2 uv = UV - CENTER; | |
| float angle = STRENGTH * uv.y; | |
| mat2 rot = mat2( | |
| vec2( cos(angle), -sin(angle) ), | |
| vec2( sin(angle), cos(angle) ) | |
| ); | |
| uv = rot * uv + CENTER; | |
| COLOR = texture(TEXTURE, uv); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment