Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualunbird

Posted 05 December 2012 - 04:17 AM

Your vertex format doesn't have a normal, so ComputeNormal can't do its work. You need this:
    [StructLayout(LayoutKind.Sequential)]
    public struct PositionNormalColored
    {
        public Vector3 Position;
        public Vector3 Normal;
        public int Color;
        public static readonly VertexFormat format = VertexFormat.Diffuse | VertexFormat.Position | VertexFormat.Normal;
    }

#1unbird

Posted 05 December 2012 - 04:11 AM

Your vertex format doesn't have a normal, so ComputeNormal can't do its work. You need this:
    [StructLayout(LayoutKind.Sequential)]
    public struct PositionNormalColored
    {
        public Vector3 Position;
        public Vector3 Normal;
        public int Color;
        public static readonly VertexFormat format = VertexFormat.Diffuse | VertexFormat.Position | VertexFormat.Normal;
    }

PARTNERS