# HG changeset patch # User sam # Date 1717834798 -25200 # Node ID d3e014c3551cde8cc4af4ce844613530e8398ade # Parent 5934c5615f133f424e05e3d3f0502c5281e0d2f7 fix: cude example perspective matrix diff -r 5934c5615f13 -r d3e014c3551c examples/E03_hello_cube.nim --- a/examples/E03_hello_cube.nim Sat Jun 08 15:16:17 2024 +0700 +++ b/examples/E03_hello_cube.nim Sat Jun 08 15:19:58 2024 +0700 @@ -56,7 +56,11 @@ Attr[Mat4]("model"), ], outputs = [Attr[Vec4f]("color")], - vertexCode = """outcolor = color; gl_Position = (Uniforms.projection * Uniforms.view * Uniforms.model) * vec4(position, 1);""", + vertexCode = """ + outcolor = color; + // gl_Position = vec4(position, 1) * (Uniforms.model * Uniforms.projection * Uniforms.view); + gl_Position = vec4(position, 1) * (Uniforms.model * Uniforms.projection * Uniforms.view); + """, fragmentCode = "color = outcolor;", ) var matDef = MaterialType(name: "default material", vertexAttributes: {"position": Vec3F32, "color": Vec4F32}.toTable)