Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WSA Compute Shaders [1110726 ]

Discussion in '2019.1 Beta' started by Foriero, Dec 17, 2018.

  1. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, is it normal that compute shaders do not work on WSA D3D ? Thank you, Marek.

    PS : Just want to add that this worked before. And now it does not work in 2018.3f2 and I expect it won't work in 2019.x as well.

    Code (CSharp):
    1. Shader "sifx/sifx_toon_eyes"
    2. {
    3. Properties
    4. {
    5.      _Color ("Color", Color) = (1,1,1,1)
    6.      [NoScaleOffset]_MainTex ("Albedo (RGB)", 2D) = "white" {}
    7.      [NoScaleOffset]_BumpMap("Normal Map", 2D) = "bump" {}
    8.      _EyeOffset("Eye Offset LR",Vector)=(0,0,0,0)
    9.      _Glossiness ("Smoothness", Range(0,1)) = 0.5
    10.      _Metallic ("Metallic", Range(0,1)) = 0.0
    11. }
    12. SubShader
    13. {
    14.      Tags { "RenderType"="Opaque" }
    15.      LOD 200
    16.  
    17.      CGPROGRAM
    18.      #pragma surface surf Standard
    19.      #pragma target 3.0
    20.  
    21.      sampler2D _MainTex;
    22.      sampler2D _BumpMap;
    23.      half _Glossiness;
    24.      half _Metallic;
    25.      fixed4 _Color;
    26.      fixed4 _EyeOffset;
    27.  
    28.      struct Input
    29.      {
    30.          float2 uv_MainTex;
    31.      };
    32.  
    33.  
    34.  
    35.      void surf (Input IN, inout SurfaceOutputStandard o)
    36.      {
    37.          fixed4 c = tex2D (_MainTex, IN.uv_MainTex + _EyeOffset.xy) * tex2D (_MainTex, IN.uv_MainTex + _EyeOffset.zw) * _Color ;
    38.          fixed4 n = 0.5 * ( tex2D (_BumpMap, IN.uv_MainTex + _EyeOffset.xy) + tex2D (_BumpMap, IN.uv_MainTex + _EyeOffset.zw) );
    39.  
    40.          o.Albedo = c.rgb;
    41.      
    42.          o.Normal = UnpackNormal(n);
    43.          o.Metallic = _Metallic;
    44.          o.Smoothness = _Glossiness;
    45.          o.Alpha = c.a;
    46.      }
    47.      ENDCG
    48. }
    49. FallBack "Diffuse"
    50. }
     
    Last edited: Dec 17, 2018
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    No, it's not normal. Can we get a bug report?
     
  3. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Well I get error message in build that compute shaders are not supported on this platform. I mean when I run it after I built it with visual studio. But I will also submit repro later today.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Yes, please do. I just double checked and compute shader graphics tests are running and passing on UWP on both D3D11 and D3D12. It could be something in the project that's triggering this.
     
  5. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Yes I can confirm it is something in the project. Im not able to make simple repro. Will dig deeper today.
     
  6. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, I can not make simple repro. Seems like it is the project that is somehow firing this "Not supported on this platform". I see only way to give you access to Collab. Does it work for you? The app works on all other platforms. ( osx, ios, android )
     
  7. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
  8. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Ok finally got it. It actually does not work already in Editor. Will send bug number soon. M.
     
  9. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Here it is.

    1110726

    Does not work in 2018.3f2 I suspect it won't work also in 2019 but haven't tested it.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680