Синтаксис:
Используется glsl
Shader "Shadow" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "Queue" = "Transparent" }
// Grab the screen behind the object into _GrabTexture, using default values
GrabPass { }
// Render the object with the texture generated above.
Pass {
SetTexture [_GrabTexture] { combine texture }
}
}
FallBack "Diffuse"
}
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "Queue" = "Transparent" }
// Grab the screen behind the object into _GrabTexture, using default values
GrabPass { }
// Render the object with the texture generated above.
Pass {
SetTexture [_GrabTexture] { combine texture }
}
}
FallBack "Diffuse"
}
положил плоскость, повесил капсулу с тенью и источником света
одел на капсулу шейдер, тень вижу - объект не вижу.
Целиком вязл пример из справки про GrabPass (отличная для меня находка, кстати!).
Вопрос: Нормально так делать тени от лоуполи версии объекта или будет еще тормознее чем обычно?