Skip to content

Instantly share code, notes, and snippets.

@darkdukey
Created July 25, 2019 17:23
Show Gist options
  • Save darkdukey/1f26e67a29d7f514a60d2e55c7b70b33 to your computer and use it in GitHub Desktop.
Save darkdukey/1f26e67a29d7f514a60d2e55c7b70b33 to your computer and use it in GitHub Desktop.
Convert ShaderToy to Unity shaders
vec2 float2
vec3 float3
vec4 float4
mat2 float2x2
mat3 float3x3
mat4 float4x4
iGlobalTime _Time.y
iTime _Time.y
mod fmod
mix lerp
fract frac
texture2D tex2D
iResolution _ScreenParams
gl_FragCoord (_iParam.scrPos.xy/_iParam.srcPos.w) * _ScreenParams
PI2 6.28318530718
pi 3.14159265358979
halfpi (pi / 2)
oneoverpi (1.0 / pi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment