I have a GLSL shader (for the terrain) that works fine in Unity Editor (3.5.7f6) but not when I build to standalone windows - I get the pink output telling me it failed.
In the runtime log it says:
Unsupported: Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass
Unsupported: GLSL Test
So I guess that’s why it’s pink…
I stripped down the shader to a bare minimum to rule out precision problems etc., and still get the same problem.
Also tried a separate test shader that doesn’t override the terrain one - same problem :-/
Shader code follows:
How are you making sure that the shader is actually included into the game data builds? Normally Unity includes everything that is explicitly “referenced”. But the terrain (before 4.0 anyway) does not explicitly “use” the shader.
You’ll have to put your terrain shaders into a folder called “Resources” (assets in Resources folders are always included into the builds, no matter if anything is using them or not).
Ah yes forgot to say: the test shader is applied directly to a cube in the scene. The test shader is in the Resources folder, and the terrain replacement shader is in a sub-folder of Resources.
Running on Windows 7 pro SP1. System32/opengl32.dll exists.
Tried on laptop (NVidia 8600M GT) and desktop (GTX-560), both gfx card drivers quite recent… stumped! :-/
Might be time to learn the shaderlab stuff eh…
Ed: out of interest tried running it on Android Nexus4: bombs out straight away, logcat reports nothing.