Esempio n. 1
0
 public override Color32 FragmentShader(Vector3 barycentric, out float zBuffer, IFragmentShaderData shaderData)
 {
     zBuffer = shaderData.GetVertex(ref barycentric).z;
     return(((Vector3)shaderData.GetUV(ref barycentric) * 255f).ToColor());
 }
Esempio n. 2
0
 public override Color32 FragmentShader(Vector3 barycentric, out float zBuffer, IFragmentShaderData shaderData)
 {
     zBuffer = shaderData.GetVertex(ref barycentric).z;
     return(color * DotForBarycentric(ref barycentric, shaderData));
 }
        public override Color32 FragmentShader(Vector3 barycentric, out float zBuffer, IFragmentShaderData shaderData)
        {
            zBuffer = shaderData.GetVertex(ref barycentric).z;

            //return new Color32(255f * barycentric.x, 255f * barycentric.y, 255f * barycentric.z, 255f);

            if (texture == null)
            {
                return(Color.White);
            }
            else
            {
                Color32 color = texture.GetColor(shaderData.GetUV(ref barycentric));
                color *= DotForBarycentric(ref barycentric, shaderData);
                return(color);
            }
        }