{"id":23226443,"url":"https://github.com/jenskrumsieck/licht","last_synced_at":"2025-08-19T13:33:00.451Z","repository":{"id":187257623,"uuid":"675841452","full_name":"JensKrumsieck/Licht","owner":"JensKrumsieck","description":"Experimental! Vulkan \u0026 ImGui Apps in C# using Silk.NET and ImGui.NET","archived":false,"fork":false,"pushed_at":"2023-10-27T12:44:40.000Z","size":3416,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-13T02:52:23.296Z","etag":null,"topics":["csharp","imgui","rendering","silk","silknet","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JensKrumsieck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-07T21:21:48.000Z","updated_at":"2024-08-19T06:42:50.000Z","dependencies_parsed_at":"2023-10-16T11:56:54.208Z","dependency_job_id":"be0b2bf0-0e76-4746-90f6-ad9e4011dd1d","html_url":"https://github.com/JensKrumsieck/Licht","commit_stats":null,"previous_names":["jenskrumsieck/catalyst","jenskrumsieck/catalyze"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensKrumsieck%2FLicht","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensKrumsieck%2FLicht/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensKrumsieck%2FLicht/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensKrumsieck%2FLicht/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JensKrumsieck","download_url":"https://codeload.github.com/JensKrumsieck/Licht/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230355829,"owners_count":18213540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","imgui","rendering","silk","silknet","vulkan"],"created_at":"2024-12-19T00:17:53.546Z","updated_at":"2024-12-19T00:17:54.177Z","avatar_url":"https://github.com/JensKrumsieck.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Licht\n[![NuGet Badge](https://buildstats.info/nuget/Licht?includePreReleases=true)](https://www.nuget.org/packages/Licht/)\n[![NuGet Badge](https://buildstats.info/nuget/Licht.Vulkan?includePreReleases=true)](https://www.nuget.org/packages/Licht.Vulkan/)\n\n\nA thin but opinionated abstraction layer to write Vulkan Code in C# (using Silk.NET) with fewer boilerplate code.\n(work in progress, see Examples folder for some examples)\n\nGet to the Triangle in less than 50 lines of code:\n```csharp\nusing Licht.Applications;\nusing Licht.Core;\nusing Licht.Vulkan;\nusing Licht.Vulkan.Memory;\nusing Licht.Vulkan.Pipelines;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Logging;\nusing Silk.NET.Windowing;\n\nvar opts = ApplicationSpecification.Default with {ApplicationName = \"Triangle\"};\nvar builder = new ApplicationBuilder(opts);\n\nbuilder.Services.AddSingleton\u003cILogger, Logger\u003e();\nbuilder.Services.AddWindow(opts);\nbuilder.Services.AddVulkanRenderer\u003cPassthroughAllocator\u003e();\n\n{\n    using var app = builder.Build\u003cTriangleApplication\u003e();\n    app.Run();\n}\n\nsealed class TriangleApplication : WindowedApplication\n{\n    private readonly VkGraphicsDevice _device;\n    private readonly VkGraphicsPipeline _pipeline;\n    private readonly PipelineEffect _effect;\n    public TriangleApplication(ILogger logger, VkGraphicsDevice device, IWindow window, VkRenderer renderer) : base(logger, renderer, window)\n    {\n        _device = device;\n        var passDescription = GraphicsPipelineDescription.Default();\n        _effect = PipelineEffect.BuildEffect(_device, \"./assets/shaders/triangle.vert.spv\", \"./assets/shaders/triangle.frag.spv\", null);\n        _pipeline = new VkGraphicsPipeline(_device, _effect, passDescription, default, Renderer.RenderPass!.Value);\n    }\n\n    public override void DrawFrame(CommandBuffer cmd, float deltaTime)\n    {\n        cmd.BindGraphicsPipeline(_pipeline);\n        cmd.Draw(3, 1, 0, 0);\n    }\n\n    public override void Release()\n    {\n        _device.WaitIdle();\n        _pipeline.Dispose();        \n        _effect.Dispose();\n        base.Release();\n    }\n}\n```\n\nThere are currently examples for:\n* Triangle Example\n* ImGui Example\n* Compute Shader (small raytraced sphere) Example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenskrumsieck%2Flicht","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenskrumsieck%2Flicht","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenskrumsieck%2Flicht/lists"}