Does anyone know why I am loosing Reflection Cubemap in my Reflective/Specular shader when I build and install my game on the iPhone.
You can have cubemaps on the iphone?
I wasn’t even aware ![]()
Try Edit/Graphics Emulation/iPhone to see if it’s even supported. I’d reckon it isn’t.
Because the iPhone doesn’t do cubemaps.
–Eric
It can however do spheremaps:
Shader "iPhone/reflective"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Reflect ("Reflection", 2D) = "black" { TexGen SphereMap }
}
SubShader
{
Pass
{
Name "REFLECT"
ZWrite On
Blend SrcAlpha OneMinusSrcAlpha
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord", texcoord0
}
SetTexture [_MainTex] {
combine texture
}
SetTexture [_Reflect] {
combine texture, previous
}
}
}
}
What about on the 3GS? Because the 3GS supports 8 textures per pass, you’d think that it would support cubemaps, right?
Thanks Ethan,
I will try spheremap.
Noob Question: How do I implement this code? And do I have to use UnityPro/iPhone Advanced. I was thinking about upgrading from Indie anyway.
Thanks for the feedback everyone.
What about on the 3GS? Because the 3GS supports 8 textures per pass, you’d think that it would support cubemaps, right?
Not until there is a 3GS specific build option.
The checkers of Unity on build build it against the 3G capabilities and will remove it.
Not until there is a 3GS specific build option.
The checkers of Unity on build build it against the 3G capabilities and will remove it.
Thanks
Nice work, but i get no shadow with your shader…whats wrong?!