forked from mirror/vulkan-zig
@@ -8,7 +8,7 @@
|
||||
},
|
||||
.vulkan_headers = .{
|
||||
.url = "https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.3.283.tar.gz",
|
||||
.hash = "1220a7e73d72a0d56bc2a65f9d8999a7c019e42260a0744c408d1cded111bc205e10",
|
||||
.hash = "N-V-__8AAAkkoQGn5z1yoNVrwqZfnYmZp8AZ5CJgoHRMQI0c",
|
||||
},
|
||||
},
|
||||
.paths = .{""},
|
||||
|
||||
@@ -4,16 +4,13 @@ const gpu = std.gpu;
|
||||
extern const a_pos: @Vector(2, f32) addrspace(.input);
|
||||
extern const a_color: @Vector(3, f32) addrspace(.input);
|
||||
|
||||
extern var v_position: @Vector(4, f32) addrspace(.output);
|
||||
extern var v_color: @Vector(3, f32) addrspace(.output);
|
||||
|
||||
export fn main() callconv(.spirv_vertex) void {
|
||||
gpu.location(&a_pos, 0);
|
||||
gpu.location(&a_color, 1);
|
||||
gpu.location(&v_color, 0);
|
||||
gpu.position(&v_position);
|
||||
|
||||
const temp: @Vector(4, f32) = .{ a_pos[0], a_pos[1], 0.0, 1.0 };
|
||||
v_position = temp;
|
||||
gpu.position_out.* = .{ a_pos[0], a_pos[1], 0.0, 1.0 };
|
||||
v_color = a_color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user