Sorting Problem After Static Batching

Hi All,

I’m having an issue with some shaders and static batching.

1249988--54140--$afterStaticBatching.jpg1249988--54141--$beforeStaticBatching.jpg
Left is after static batching, right is before

The rim lighting shader is a 2 pass shader, one for color, one for the rim light. It sorts fine before static batching the back 2 spheres, but after static batching just the opaque spheres in the background seem to sort in front of the shaders rim lighting pass.

The rim lit sphere has not been static batched.

I can’t seem to find anyone else with the problem, any ideas?

1249988--54138--$afterStaticBatching.png
1249988--54139--$beforeStaticBatching.png

Sorry I should have kept looking into the problem, The issue was that I was setting the “Transparent” queue tag of my rim shader in the pass rather than the subshader