Search Unity

"shader state not supported" on Windows Phone 8.1

Discussion in 'Windows' started by Miggy, Jan 20, 2015.

  1. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    Hi folks,

    I'm porting to Windows Phone 8.1 and have the game up and running but my shaders seem to be failing and falling back to the fallback shader. In UnityPlayer.log I get a lot of these warnings about "shadowcollector" for all the missing shaders:

    WARNING: Shader Unsupported: 'VertexLit' - Pass 'SHADOWCOLLECTOR' shader state not supported
    WARNING: Shader Unsupported: 'Diffuse' - Pass 'SHADOWCOLLECTOR' shader state not supported
    WARNING: Shader Unsupported: 'Marmoset/MAE_Marmoset_ScreenCracks' - Pass 'SHADOWCOLLECTOR' shader state not supported
    WARNING: Shader Unsupported: 'Marmoset/MAE_Marmoset_ScreenCracks' - Pass 'FORWARD' shader state not supported

    This is with Unity 4.6.1 and a BLU Win HD.

    Has anyone run into this before? I didn't think I was using shadow collectors and I can't find any way to disable them.

    Thanks!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Hi,

    I believe Shadow collector warnings can be safely ignored. The one about FORWARD shader state being not supported means that the shader is probably targeting higher shader model than Windows Phone supports. What's inside that shader?
     
  3. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76

    These are the Marmoset Skyshop shaders and none of them appear to be showing up. Is there any way to obtain some error messages describing what is causing the problem? I don't see any shader error messages in the inspector when the other platforms would show shader compilation errors.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    I'd check inside the shader. Maybe it's specifically disabled inside of it for Windows Phones? Look for "exclude renderers d3d11_9x".
     
  5. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    It looks like a lot of the Marmoset shaders do exclude d3d11_9x but not the particular ones I'm using.

    Using #pragma target 2.0 appears to work though. Is that a per device thing or are all Windows Phones limited to D3D11 9_3 shader model 2.0?
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Currently all available Windows Phone devices support up to DirectX 11 Feature Level 9.3. That is slightly below shader model 3.0, as it doesn't support some of the features, so we treat them as shader model 2.0. There are rumors that one of the new Qualcomm chips is gonna support feature level 11.1, but there's nothing concrete yet.
     
    Last edited: Jan 22, 2015
  7. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    Yeah, that came as a bit of a shock to me after being "spoiled" by SM 3.0 on iOS and Android. I'm now downgrading all shaders to 2.0. Thanks for your help!