Skip to content

Commit 7ffb128

Browse files
committed
Fixing shaders
Pixelation Transparent adding Unlit double sided
1 parent 9461aa2 commit 7ffb128

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

Assets/Shaders/2D/Sprites/Pixelation.shader

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
}
88
Subshader
99
{
10+
Tags {"Queue"="Transparent" "IgnoreProjector"="true" "RenderType"="Transparent"}
11+
ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off
12+
1013
Pass
1114
{
1215
CGPROGRAM
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Shader "UnityCommunity/Unlit/Double Sided"
2+
{
3+
Properties
4+
{
5+
_MainTex ("Texture", 2D) = "white" {}
6+
}
7+
Subshader
8+
{
9+
Tags {"Queue"="Transparent" "IgnoreProjector"="true" "RenderType"="Transparent"}
10+
ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off
11+
12+
Pass
13+
{
14+
Cull Off
15+
CGPROGRAM
16+
#pragma vertex vertex_shader
17+
#pragma fragment pixel_shader
18+
#pragma target 3.0
19+
20+
sampler2D _MainTex;
21+
22+
struct custom_type
23+
{
24+
float4 clip_space_vertex : SV_POSITION;
25+
float2 uv : TEXCOORD0;
26+
};
27+
28+
custom_type vertex_shader (float4 object_space_vertex : POSITION, float2 uv : TEXCOORD0)
29+
{
30+
custom_type vs;
31+
vs.clip_space_vertex = UnityObjectToClipPos (object_space_vertex);
32+
vs.uv=uv;
33+
return vs;
34+
}
35+
36+
float4 pixel_shader (custom_type ps) : SV_TARGET
37+
{
38+
return tex2D (_MainTex,ps.uv.xy);
39+
}
40+
41+
ENDCG
42+
}
43+
}
44+
}

Assets/Shaders/3D/Unlit/UnlitDoubleSided.shader.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)