File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,12 @@ Shader "47E/Unlit"
46
46
CGPROGRAM
47
47
#pragma vertex vert
48
48
#pragma fragment frag
49
+ #pragma multi_compile_instancing
49
50
50
51
#include "UnityCG.cginc"
51
52
52
- #pragma shader_feature ALPHA_CLIP
53
- #pragma shader_feature VERTEX_COLOR
53
+ #pragma multi_compile ALPHA_CLIP
54
+ #pragma multi_compile VERTEX_COLOR
54
55
55
56
struct appdata
56
57
{
@@ -64,24 +65,32 @@ Shader "47E/Unlit"
64
65
65
66
struct v2f
66
67
{
68
+ float4 vertex : SV_POSITION ;
67
69
float2 uv : TEXCOORD0 ;
68
- float4 vertex : SV_POSITION ;
69
70
#ifdef VERTEX_COLOR
70
71
fixed4 color : COLOR ;
71
72
#endif
72
73
UNITY_VERTEX_OUTPUT_STEREO
73
74
};
74
-
75
+
76
+ UNITY_INSTANCING_BUFFER_START (UnityPerMaterial)
75
77
sampler2D _MainTex;
76
- fixed4 _MainTex_ST;
78
+ float4 _MainTex_ST;
77
79
fixed4 _Color;
80
+ #ifdef ALPHA_CLIP
78
81
fixed _AlphaClip;
82
+ #endif
79
83
fixed _AlphaMultiplier;
84
+ UNITY_INSTANCING_BUFFER_END (UnityPerMaterial)
80
85
81
86
v2f vert (appdata v)
82
87
{
83
88
v2f o;
84
89
UNITY_SETUP_INSTANCE_ID (v);
90
+ //https://forum.unity.com/threads/gpu-instancing-with-single-pass-stereo-rendering.1222533/
91
+ //#ifdef UNITY_STEREO_INSTANCING_ENABLED
92
+ //InstanceID = InstanceID/2;
93
+ //#endif
85
94
UNITY_INITIALIZE_OUTPUT (v2f, o);
86
95
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO (o);
87
96
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " com.fortysevene.youneiti-toolbox" ,
3
- "version" : " 1.1.24 " ,
3
+ "version" : " 1.1.25 " ,
4
4
"unity" : " 2019.3" ,
5
5
"displayName" : " YouNeiTi Toolbox" ,
6
6
"description" : " A collection of handy tools making unity devs happier" ,
You can’t perform that action at this time.
0 commit comments