- Home /
TexGen SphereMap appears to be causing issues
I am using Unity on Wii and having an issue; I am unsure if this is Wii specific, and I know that there probably aren't many people using Unity on Wii.
I'm having problems with the "SphereMap" texgenmode in ShaderLab. It works as expected in the editor (with "Wii Graphics Emulation" enabled); however, on hardware the object displays as solid magenta, and thereafter almost everything else displays with corrupt texture coordinates. Some other 'texgenmodes' also cause this issue. Removing the "TexGen SphereMap" or disabling the pass that uses that texture makes the issue go away. I have attached the shader file. Any assistance would be appreciated. Thank you.
Shader "1P Wii Shader" {
Properties {
_Color ("Main Color", Color) = (1,1,1,0)
_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" {}
_SphereMapTex ("Spheremap (RGB)", 2D) = "black" {TexGen SphereMap} //appears to be causing problems
_SphereMapColor ("Spheremap Color (RGB)", Color) = (1,1,1,1)
}
SubShader {
Pass {
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Lighting On
SeparateSpecular On
SetTexture [_MainTex] {
Combine texture * primary DOUBLE, texture * primary
}
}
//Sphere Map
Pass
{
Name "SPHERE MAP"
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
SetTexture [_SphereMapTex] {
constantColor[_SphereMapColor]
combine texture * constant
}
SetTexture [_MainTex] {
combine previous, texture * previous
}
}
}
}
Your answer
Follow this Question
Related Questions
Wii graphic specs 1 Answer
Changing Unity's Graphics Engine? 2 Answers
Specific texturing 1 Answer
Does using "half res" in the quality settings reduce texture RAM usage? 1 Answer
Android device graphics problem !!! 1 Answer