正交投影完成

This commit is contained in:
xsl
2025-09-24 22:20:07 +08:00
parent ceba7f90ac
commit a112cecfbf
6 changed files with 18 additions and 1 deletions
+4 -1
View File
@@ -15,7 +15,10 @@ void main() {
// 预计算MVP矩阵以减少乘法次数
mat4 mvp = ubo.proj * ubo.view * ubo.model;
//vec3 pos = vec3(2.0, inPosition.y, inPosition.z);
gl_Position = mvp * vec4(inPosition, 1.0);
//gl_Position = mvp * vec4(inPosition, 1.0);
gl_Position = vec4(inPosition.xy*2 -1, 0.5, 1.0);
fragColor = inColor;
gl_PointSize = 2.0;
}