Fully implemented lighting
Two types of light sources are currently supported: directional lights and point lights. A scene can have only one directional light and up to 1024 point lights.
This commit is contained in:
parent
214317e0bf
commit
503ed33aec
7 changed files with 181 additions and 48 deletions
|
|
@ -314,6 +314,11 @@ pub fn initShader(self: Self, comptime name: []const u8) !c.VkShaderModule {
|
|||
return shader_module;
|
||||
}
|
||||
|
||||
pub fn pushConstant(self: Self, pipeline: vk.GraphicsPipeline, stage: u32, offset: u32, size: u32, data: [*c]u8, frame: usize) void {
|
||||
_ = stage;
|
||||
c.vkCmdPushConstants(self.command_buffers[frame], pipeline.layout, c.VK_SHADER_STAGE_FRAGMENT_BIT, offset, size, data);
|
||||
}
|
||||
|
||||
pub fn deinitShader(self: Self, shader: c.VkShaderModule) void {
|
||||
c.vkDestroyShaderModule(self.handle, shader, null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue