- Home /
Add Shadows to Shader
Anyone know how I could add support for runtime shadows(unity pro) to this shaders? Thanks!
Shader "Terrain/AlphaBlended" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_DetailTex ("Detail (RGB)", 2D) = "white" {}
_LowTex ("Low (RGB)", 2D) = "white" {}
_BlendMap ("BlendMap (RGBA)", 2D) = "white" {}
_LightMap ("LightMap (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
Material {
Diffuse (1,1,1,1)
Ambient (1,1,1,1)
}
Lighting On
BindChannels {
Bind "vertex", vertex
Bind "color", color
Bind "texcoord", texcoord
}
SetTexture [_BlendMap] {
Combine texture
}
SetTexture [_DetailTex] {
Combine texture * previous
}
SetTexture [_MainTex] {
Combine previous lerp (previous) texture
}
SetTexture [_LightMap] {
Combine previous * texture
}
}
}
FallBack "Diffuse", 1
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612111138im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Terrain billboard trees not dropping shadows. 2 Answers
Strange shading on procedural mesh 0 Answers
Block/Obscure light without shadows 0 Answers
How to automatically apply different textures on terrain based on height? 5 Answers
Custom Mesh for Game - Edges of my meshs' tris keep appearing on flat surfaces 0 Answers