Simplify lessons that use textured shaders w/o tinting

This commit is contained in:
2025-06-14 21:39:25 +10:00
parent ac038eecfd
commit 6e08f363ae
24 changed files with 78 additions and 52 deletions

View File

@@ -266,11 +266,8 @@ struct Lesson7: AppDelegate
}
else
{
struct Uniforms { var modelViewProj: simd_float4x4, color: SIMD4<Float> }
var u = Uniforms(
modelViewProj: self.projection * model,
color: .init(repeating: 1.0))
SDL_PushGPUVertexUniformData(cmd, 0, &u, UInt32(MemoryLayout<Uniforms>.size))
var modelViewProj = self.projection * model
SDL_PushGPUVertexUniformData(cmd, 0, &modelViewProj, UInt32(MemoryLayout<simd_float4x4>.size))
}
// Draw textured cube