@Michal_1 desperately trying to get any geometry shader working on mac, but keep running into 2 things:
Shader is not supported on this GPU, and Metal: Error creating pipeline state (Custom/Geom_Grass): Vertex attribute POSITION0(0) is missing from the vertex descriptor.
I tried running this one and got the Shader not supported… any advice?
EDIT: ok so after adding a fallback to yours it compiled. but still not for metal 
my specs are:
MacBook Pro (Retina, 15-inch, Early 2013)
2,7 GHz Intel Core i7
16 GB 1600 MHz DDR3
NVIDIA GeForce GT 650M 1024 MB
Intel HD Graphics 4000 1536 MB
i wouldn’t thing my macbook is the problem.
example of shader where i get the pipeline error:
Shader "Custom/Geom_Grass" {
Properties {
_MainTex ("Main Texture", 2D) = "white"{}
_Color ("Color", Color) = (1,1,1,1)
_GrassHeight ("Grass Height", float) = 3
_GrassWidth ("Grass Width", float) = 0.1
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
Cull off
ZWrite off
Pass
{
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma vertex vert
#pragma geometry geom
#pragma fragment frag
#pragma target 5.0
#pragma multi_compile_fog
#include "UnityCG.cginc"
float4 _Color;
float3 _worldPos;
float _GrassHeight;
float _GrassWidth;
struct data{
float3 pos;
};
StructuredBuffer<data> buff_Points;
struct input {
float4 pos:SV_POSITION;
float2 uv:TEXCOORD0;
UNITY_FOG_COORDS(1)
};
sampler2D _MainTex;
half _Glossiness;
half _Metallic;
input vert(uint id : SV_VertexID)
{
input o;
o.pos = float4(buff_Points[id].pos +_worldPos, 1);
return o;
}
[maxvertexcount(3)]
void geom(point input p[1], inout TriangleStream<input> triStream)
{
float4 p1 = p[0].pos.xyzw + float4(0,_GrassHeight,0,0);
float4 p2 = p[0].pos.xyzw + float4(-_GrassWidth,0,0,0);
float4 p3 = p[0].pos.xyzw + float4(_GrassWidth,0,0,0);
input pIN;
pIN.pos = mul(UNITY_MATRIX_VP, p1);
pIN.uv = float2(0,0);
UNITY_TRANSFER_FOG(pIN,pIN.pos);
triStream.Append(pIN);
pIN.pos = mul(UNITY_MATRIX_VP, p2);
pIN.uv = float2(0,1);
UNITY_TRANSFER_FOG(pIN,pIN.pos);
triStream.Append(pIN);
pIN.pos = mul(UNITY_MATRIX_VP, p3);
pIN.uv = float2(1,0);
UNITY_TRANSFER_FOG(pIN,pIN.pos);
triStream.Append(pIN);
}
float4 frag(input i):COLOR
{
fixed4 col = tex2D(_MainTex, i.uv)*_Color;
UNITY_APPLY_FOG(i.foCoord, col);
return col;
}
ENDCG
}
}
FallBack "Diffuse"
}