Skip to content

Instantly share code, notes, and snippets.

@koji
Last active July 6, 2019 22:01
Show Gist options
  • Save koji/b4a3a4eebdbe79b5f7021f6c70f387fb to your computer and use it in GitHub Desktop.
Save koji/b4a3a4eebdbe79b5f7021f6c70f387fb to your computer and use it in GitHub Desktop.
FragmentShader to Unity Shader
vec<n>  --> float<n>
vec2 --> float2
vec3 --> float3

texture --> tex2D

u_time --> _Time.y

atan(x,y) --> atan2(y,x)

fract --> frac

mix --> lerp

mod --> need to write a function
        x-y*floor(x/y)

col *= 1.5 --> col = mul(1.5, col)

gl_FragColor --> return

mat<n> ---> floatnxn

mat3 --> float3x3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment