GameObjects below terrain visible through terrain
My gameobjects that are below the terrain (only part of them stick above it) show through the terrain like a shadow
This ONLY happens when I build the game and run in standalone. I get the following shader warning in the output_log
Shader 'Nature/Terrain/Standard': fallback shader 'Nature/Terrain/Diffuse' not found
WARNING: Shader Unsupported: 'Enviro/BumpedDiffuseOverlaySM2' - All passes removed
What does this mean? My hardware should support any shader. I'm running a GTX 750TI. Does anyone know what I can do to resolve this?
Look at your Terrain details (the gear), what do you have for $$anonymous$$aterial and if you have a custom material what shader is it using?
I'm just using the built-in Standard material. I've tried setting it to legacy but it does the same thing.
Are the shaders from the warning in the hierarchy noted by the message?
Where do I even look for them? Nature/Terrain/Standard should just be the default terrain shader. I haven't done anything custom with shaders and I haven't deleted any shaders. If it has somehow been deleted, how do I re-install it? Also, if it's really deleted, why does it work fine in the editor but not in the standalone build?
If you create a (test) material, at the top of the inspector panel you'll see the shader selected (likely "Standard") - click Standard and a pop-up appears with the hierarchy of shaders, see if you have those.
Look through the Build and Player settings, see if you've by chance selected or de-selected some option there that's doing something unexpected.
The only thing I've changed in either of those is the game name/company name.
N$$anonymous$$, I got it. It was an error with the ScreenSpaceAmbientOcclusion script I had forgotten I put on my camera and that hadn't been complaining for some reason. It was missing the shader. It's fixed now!
Answer by carnivoris · Sep 22, 2015 at 12:15 AM
I had an SSAO script on my camera that hadn't been complaining about missing its shader. I guess I fixed something else that made Unity want to tell me about this error. I added the shader and now it's fixed.