- Home /
Strange artifacts on Vertex Color Shader
I am using Vertex Color shader for coloring my generated mesh. I have a problem, when I want to reduce alpha of mesh color, e.g. for water, I get strange artifacts on the mesh.
Here is shot without water having any alpha:
Here is shot with water mesh having reduced alpha - problem is seen here
Here is one shot under water, no faces / polygons are sideways that could cause the problem
Here is wireframe mode
The problem is in 2nd picture, water having artifacts with alpha reduced. The color changes depending on Camera Background color, e.g. red-ish in this example.
Shader I use:
 Shader "Custom/Vertex Lit - Shadows" {
     SubShader{
         Tags{ "RenderType" = "Transparent" "Queue" = "Transparent" }
         Blend SrcAlpha OneMinusSrcAlpha
 
         CGPROGRAM
         #pragma surface surf Lambert keepalpha fullforwardshadows
         
         struct Input {
             fixed4 color : COLOR;
         };
         void surf(Input IN, inout SurfaceOutput o) {
             o.Albedo = IN.color.rgb;
             o.Alpha = IN.color.a;
         }
         ENDCG
         }
         Fallback "VertexLit"
 }
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                