Is there a way with Unity iPhone to turn off Z writes? So like if I want to render something with a special camera so that the objects rendered don’t generate Z values in the framebuffer, is that possible?
You need to create custom shader for that. Following shader will render white mesh without Z writes.
Shader "Zoff" {
SubShader {
Pass {
Material {
Diffuse (1,1,1,1)
}
ZWrite Off
}
}
}
Take a look Unity - Manual: ShaderLab: commands for more details.
Awesome, thanks! I didn’t know custom shaders still worked for the iPhone.
Custom shaders work just fine as long as you’re using texture combiners.