Shader "Projector/Projector Multiply"
{
Properties
{
_Color ("Main Colour", Color) = (1,1,1,0)
_ShadowTex ("Cookie", 2D) = "gray" { TexGen ObjectLinear }
}
Subshader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent+100"}
Pass
{
ZWrite Off
Offset -1, -1
Fog { Mode Off }
//AlphaTest Greater .1
AlphaTest Less 1
ColorMask RGB
Blend One SrcAlpha
SetTexture [_ShadowTex]
{
constantColor [_Color]
combine texture * constant, One - texture
Matrix [_Projector]
}
}
}
}
We slightly modified it so that it can take a color and removed the falloff texture, but that's pretty much what you'll find in the Projectors package BlobShadow prefab shader.
Since I want way better control about the way this is all rendered, and since like every sane person I hate fixed-functions shader programming, I wanted to move it to CG code. My puny and failed attempt at simply reproducing what the fixed function shader was doing looks like this:
'TA > Unity' 카테고리의 다른 글
TD CameraControl C# (0) | 2013.05.09 |
---|---|
유니티 C# 공부 모음 (0) | 2013.05.07 |
HLSL 함수 (0) | 2012.07.10 |
Blending modes..참고 자료 (0) | 2012.06.08 |
기초적인 조명쉐이더 (0) | 2012.06.08 |