*
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
Shader "Mobile/Legacy/Lightmap/Lightmap AlphaTest"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_LightMap ("Lightmap (RGB)", 2D) = "white" { LightmapMode }
|
||||
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
Name "BASE"
|
||||
Alphatest Greater [_Cutoff]
|
||||
|
||||
BindChannels {
|
||||
Bind "Vertex", vertex
|
||||
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
|
||||
Bind "texcoord", texcoord1 // main uses 1st uv
|
||||
}
|
||||
SetTexture [_LightMap] {
|
||||
combine texture
|
||||
}
|
||||
SetTexture [_MainTex] {
|
||||
combine texture * previous, texture
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e14df94c1bd5d475bb0fb92fefa1f00d
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
Shader "Mobile/Legacy/Lightmap/Lightmap Only"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_LightMap ("Lightmap (RGB)", 2D) = "black" { LightmapMode }
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
Name "BASE"
|
||||
Tags {"LightMode" = "Always"}
|
||||
|
||||
BindChannels {
|
||||
Bind "Vertex", vertex
|
||||
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
|
||||
Bind "texcoord", texcoord1 // main uses 1st uv
|
||||
}
|
||||
SetTexture [_LightMap] {
|
||||
constantColor [_Color]
|
||||
combine texture * constant
|
||||
}
|
||||
SetTexture [_MainTex] {
|
||||
combine texture * previous
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9732e64c49e904ff2a10fc7794607fcf
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
Shader "Mobile/Legacy/Lightmap/Reflective"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_LightMap ("Lightmap (RGB)", 2D) = "white" { LightmapMode }
|
||||
_Reflect ("Reflection", 2D) = "black" { TexGen SphereMap }
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
Name "BASE"
|
||||
|
||||
BindChannels {
|
||||
Bind "Vertex", vertex
|
||||
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
|
||||
Bind "texcoord", texcoord1 // main uses 1st uv
|
||||
}
|
||||
SetTexture [_LightMap] {
|
||||
combine texture
|
||||
}
|
||||
SetTexture [_MainTex] {
|
||||
combine texture * previous
|
||||
}
|
||||
}
|
||||
|
||||
/* This pass uses vertex information to control Reflection
|
||||
Pass
|
||||
{
|
||||
Name "REFLECT"
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMaterial AmbientAndDiffuse
|
||||
Lighting Off
|
||||
|
||||
BindChannels {
|
||||
Bind "Vertex", vertex
|
||||
Bind "normal", normal
|
||||
}
|
||||
|
||||
SetTexture [_Reflect] {
|
||||
combine texture, primary
|
||||
}
|
||||
}*/
|
||||
|
||||
// Use this pass, if you want to fetch alpha from main texture instead
|
||||
Pass
|
||||
{
|
||||
Name "REFLECT"
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
BindChannels {
|
||||
Bind "Vertex", vertex
|
||||
Bind "normal", normal
|
||||
Bind "texcoord", texcoord0 // main uses 1st uv
|
||||
}
|
||||
|
||||
SetTexture [_MainTex] {
|
||||
combine texture
|
||||
}
|
||||
SetTexture [_Reflect] {
|
||||
combine texture, previous
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af040a092e2114e9fbd6fab7402e066d
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
Reference in New Issue
Block a user