Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Internal-Colored2" {
- Properties {
- _Color ("Color", Color) = (1,1,1,1)
- _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
- _SrcBlend ("SrcBlend", Int) = 5.0 // SrcAlpha
- _DstBlend ("DstBlend", Int) = 10.0 // OneMinusSrcAlpha
- _ZWrite ("ZWrite", Int) = 1.0 // On
- _ZTest ("ZTest", Int) = 4.0 // LEqual
- _Cull ("Cull", Int) = 0.0 // Off
- _ZBias ("ZBias", Float) = 0.0
- }
- SubShader {
- Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
- Cull Off
- // Non-lightmapped
- Pass {
- Tags { "LightMode" = "Vertex" }
- Material {
- Diffuse [_Color]
- Ambient [_Color]
- }
- Lighting On
- SeparateSpecular On
- SetTexture [_MainTex] {
- Combine texture * primary DOUBLE, texture * primary
- }
- }
- Pass {
- Tags{ "LIGHTMODE" = "VertexLM" "QUEUE" = "Transparent" "IGNOREPROJECTOR" = "true" "RenderType" = "Transparent" }
- Blend [_SrcBlend] [_DstBlend]
- ZWrite [_ZWrite]
- ZTest [_ZTest]
- Cull [_Cull]
- Offset [_ZBias], [_ZBias]
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #pragma target 2.0
- #pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
- #include "UnityCG.cginc"
- struct appdata_t {
- float4 vertex : POSITION;
- float4 color : COLOR;
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- struct v2f {
- fixed4 color : COLOR;
- float4 vertex : SV_POSITION;
- UNITY_VERTEX_OUTPUT_STEREO
- };
- float4 _Color;
- v2f vert (appdata_t v) {
- v2f o;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.color = v.color * _Color;
- return o;
- }
- fixed4 frag (v2f i) : SV_Target {
- return i.color;
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement