Created
February 6, 2021 09:44
-
-
Save sorskoot/315d0687d4c1e06ebf512cb607dbc7e0 to your computer and use it in GitHub Desktop.
Funny little shader to apply to the camera in OBS using the 'user-defined shader' filter
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
uniform float speed; | |
uniform float stepsize; | |
// Default settings in OBS | |
// speed: 4.0 | |
// stepsize: 2.0 | |
float rand(float co){ | |
return frac(sin(dot(float2(co,co) ,float2(12.9898,78.233))) * 43758.5453); | |
} | |
float4 mainImage(VertData v_in) : TARGET | |
{ | |
float time = elapsed_time * speed; | |
float x = v_in.uv.x + (sin(v_in.uv.x*50+time)*sin(time)*0.02); | |
float y = v_in.uv.y + (cos(v_in.uv.y*100+time/2)*cos(time)*0.02); | |
float2 gl = float2(x,y); | |
float4 c = image.Sample(textureSampler, gl); | |
return c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment