Синтаксис:
Используется glsl
Shader "шейдер_какон_называется_никого_не_волнует" {
Properties {
_MainTex("Main texture RGBA", 2D) = "black"
_FadeTex("Fade texture RGBA", 2D) = "black"
}
Category {
Lighting Off
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags { Queue = Transparent }
SubShader {
Pass {
SetTexture[_MainTex] { combine texture }
SetTexture[_FadeTex] { combine texture lerp(texture) previous }
}
}
}
}
Properties {
_MainTex("Main texture RGBA", 2D) = "black"
_FadeTex("Fade texture RGBA", 2D) = "black"
}
Category {
Lighting Off
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags { Queue = Transparent }
SubShader {
Pass {
SetTexture[_MainTex] { combine texture }
SetTexture[_FadeTex] { combine texture lerp(texture) previous }
}
}
}
}
вот что на выходе получается.
как будет правильней?