标签:#CGSL

Posts

· 2017-11-29 · * Unity * Shader * CGSL *

Sometimes we get some really wonderful effect rendered by other type of shader like glsl.

So before rewriting glsl shader to unity vertex/fragment shader, we must know the convert rules:

vec2            -> float2
vec3            -> float3
vec4            -> float4

texture2D       -> tex2D
textureCube     -> texCUBE
mat2            -> float2x2
fract           -> frac

iGlobalTime     -> _Time.y