- Home /
Lightmapping on a custom shader
Hey guise first time question asker and need help plox.
Im using this shader to make my object double sided but when I apply lightmap to it, it goes invisible and i can just see the mesh. Any ideas? Im also getting a message in my lightmapping window saying "Objects size in light map has reached max atlas size".
Cheers in advance.
Shader im using:
Shader "DoubleSided_IF/Diffuse" {
Properties {
_AmbientColor ("Ambient Color", Color) = (1, 1, 1, 1)
_DiffuseColor ("Diffuse Color", Color) = (0, 0, 0, 0)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_SideOne ("Side 1", 2D) = "white" {}
_SideTwo ("Side 2", 2D) = "white" {}
}
SubShader {
Pass {
Material {
Diffuse [_DiffuseColor]
Ambient [_AmbientColor]
}
Cull Off
Lighting On
SetTexture [_SideOne] {
Combine Primary * Texture
}
}
Pass {
Material {
Diffuse [_DiffuseColor]
Ambient [_AmbientColor]
}
Cull Off
Lighting On
SetTexture [_SideTwo] {
Combine Primary * Texture
}
}
}
}
Comment