Search Unity

macOS Sierra 10.12 - Shader is not supported on this GPU Error

Discussion in 'Shaders' started by cons_fx, Oct 19, 2018.

  1. cons_fx

    cons_fx

    Joined:
    Sep 24, 2018
    Posts:
    6
    Hello everyone,

    I'm trying to create a sphere in which I play a VR video on Mac in unity and I found a shader script from the net which flips the normals of the sphere so the video can play inside-out.

    Apparently, the shader doesn't work on my mac even though I have enabled the OpenGL renderer and removed Metal from the Player settings. Is there anything I am missing?

    The shader works perfectly fine on my laptop which has Windows but I would like to work on my mac since it has better specs.

    Thanks in advance.

     Shader "Custom/Flip Normals" {
    Properties {
    _MainTex ("Base (RGB)", 2D) = "white" {}
    }
    SubShader {

    Tags { "RenderType" = "Opaque" }

    Cull Off

    CGPROGRAM

    #pragma surface surf Lambert vertex:vert
    sampler2D _MainTex;

    struct Input {
    float2 uv_MainTex;
    float4 color : COLOR;
    };

    void vert(inout appdata_full v) {
    v.normal.xyz = v.normal * -1;
    }

    void surf (Input IN, inout SurfaceOutput o) {
    fixed3 result = tex2D(_MainTex, IN.uv_MainTex);
    o.Albedo = result.rgb;
    o.Alpha = 1;
    }

    ENDCG

    }

    Fallback "Diffuse"
     
  2. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,906
    Shader compiles fine on my Mac. Perhaps there's a missing closing brace? }