Shaders appearing black on Metal devices (4.13 preview 1)
In 4.13 preview 1, most of the shaders in my project appear randomly black on iPhone 6S Plus. This worked fine on 4.11 and earlier, on all devices.
The ones that show black are different each startup (one time the fences will display normally but rocks are black, then next launch they will be black but rocks will display normally).
Everything appears normal on iPad 3 and iPhone 4S - so I'm guessing this is metal-device-specific but I haven't been able to test this on another metal device yet.
Things I have tried:
The project is blueprint-only. All shaders are unlit (and HDR is turned off).
I'll attempt to reproduce this in a blank map/project next but if you can think of any other things to check, please let me know (happy to provide my project for debugging, regardless - it's small and blueprint-only).
First two shots show the problem (same build launched twice for different results), and third is how it looks on iPad 3.
OK, turns out my previous answer was not the solution. I ended up having to upgrade to 4.13 for various reasons, so I had to figure this out properly - deleting all the cached/intermediate data etc mentioned in my other answer didn't fix the problem on 4.13.
After changing various project settings, force-recompiling blueprints and making materials a constant color only, it turns out it was this project setting: "Game discards unused material quality levels", under Rendering
If I uncheck that, the materials are no longer black... if I turn it back on, they go black again (even if the materials in question no longer have a Quality Switch hooked up). For some reason this causes problems on Metal devices only in 4.13 (I'm not doing any runtime switching of quality levels, so no idea why).
answered Sep 05 '16 at 11:22 PM
OK so it turns out it was happening on 4.12.5 as well (same as 4.13 - different objects would be black each time I restarted the app on the device, sometimes none were) - I ended up nuking everything from my machine, that is:
Re-downloaded 4.12.5, did a full cook and so far it seems to be OK. So it seems like the stuff in ProgramData was the most likely cause.
Haven't tried 4.13 again but am a little jaded from the whole process now so I might skip it!
answered Aug 19 '16 at 01:20 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here