Files
JJBB/Assets/BuiltinAssets/Shader/DefaultResourcesExtra/Lightmap-VertexLit.shader

51 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
Shader "Legacy Shaders/Lightmapped/VertexLit" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
_LightMap ("Lightmap (RGB)", 2D) = "lightmap" { LightmapMode }
}
SubShader {
LOD 100
Tags { "RenderType"="Opaque" }
Pass {
Name "BASE"
Tags {"LightMode" = "Vertex"}
Material {
Diffuse [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
}
Lighting On
SeparateSpecular On
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
Bind "texcoord1", texcoord1 // lightmap uses 2nd uv
Bind "texcoord", texcoord2 // main uses 1st uv
}
SetTexture [_LightMap] {
constantColor [_Color]
combine texture * constant
}
SetTexture [_LightMap] {
constantColor (0.5,0.5,0.5,0.5)
combine previous * constant + primary
}
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine texture * previous DOUBLE, constant // UNITY_OPAQUE_ALPHA_FFP
}
}
}
Fallback "VertexLit"
}