- Home /
Twosided shader with transparent texture
Hey, i found that there is no shader in Unity that allows to see faces from from and back. All shaders have culling turned on. Making my own shader with culling turned off isn't hard, but problems start when i want my texture to use transparency. Culling just doesn't work with it, or there is some other way? Here is "changed" code of Alpha-Diffuse.shader that doesn't work to me:
Shader "Transparent/Diffuse" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 200
Pass {
Cull Off
}
CGPROGRAM
#pragma surface surf Lambert alpha
sampler2D _MainTex;
fixed4 _Color;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Transparent/VertexLit"
}
Answer by Animatics_3D · May 08, 2014 at 06:37 PM
Mobile > Particles > Alpha Blended - shader in Unity that allows to see faces from front and back (Both Side).
Your answer
Follow this Question
Related Questions
Semi transparent Object behind walls? 1 Answer
Is there a way to get scene color after transparent pass in URP using the new 2D Renderer ? 0 Answers
Z-priming alpha-per-vertex 0 Answers
Transparent terrain shader not working 2 Answers
Unlit Transparent Cutout shader that can switch between two textures 0 Answers