Author Topic: Odd behavior from color output in ios from Unity  (Read 1199 times)

We're getting some odd behavior from the base color output in a couple of our sbsar files. In Unity we have two models with two different materials that were built in substance and they look as expected. We're texturing our models using the metal/rough workflow in Substance Designer. When we load the build onto any ios device, the base color/albedo is getting misaligned. I ran a test by adding a UV snapshot into a blend node and setting that to switch with a function so we could toggle back and forth from the UV texture to the procedural color. The UV's are properly aligned. All of the other PBR attributes look as they should. All of the procedural textures I've added through the roughness and metallic outputs are aligned. The normal and occlusion maps are aligned. The only thing getting misaligned is the color which UV snapshot is being fed through.

We've found a few posts in other forums that say we may need to export color maps to fix the alignment issue which makes sense since our UV snapshot is aligned properly but this defeats the purpose of it being procedural which we need for our end user. We though this might be an issue going from OpenGL in Unity to Metal in iOS but we swapped from Metal to OpenGL in the iOS build and ended up with the same results.

Any ideas?

Update: We've fixed the issue. The problem was in some of our blend nodes where we were using the switch blend mode with a function to swap the opacity, (float value) from 0 to 1 to add/remove noise. This was being switched on and off with a boolean in the input parameters. We had no issues with Unity's compiler being able to convert this float to a boolean but apparently the xcode compiler is not capable of handling this.