Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#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