Dear guys.
I was having a look to the warehause (occlusion culling demo) matrial setup, and I can’t get how the boxes are lighted.
There is no Lightmap and each box has it’s own light and color.
I guess it’s the shader, but I can’t find how.
Can you help me?
----------------- the shader so you don't need to load the map---------
Shader " Vertex Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
Material {
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
ColorMaterial AmbientAndDiffuse
Lighting Off
SeperateSpecular On
SetTexture [_MainTex] {
Combine texture * primary, texture * primary
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine previous * constant DOUBLE, previous * constant
}
}
}
Fallback " VertexLit", 1
}
[/code]