{"id":22510996,"url":"https://github.com/jpbruyere/shaderc.net","last_synced_at":"2025-08-03T14:32:10.724Z","repository":{"id":74475913,"uuid":"260930276","full_name":"jpbruyere/shaderc.net","owner":"jpbruyere","description":"shaderc net binding","archived":false,"fork":false,"pushed_at":"2023-06-21T04:12:11.000Z","size":155,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T15:15:07.201Z","etag":null,"topics":["binding","csharp","net","opengl","shader","shaderc","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/jpbruyere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-03T13:44:26.000Z","updated_at":"2024-07-29T12:53:58.000Z","dependencies_parsed_at":"2023-02-24T07:00:14.411Z","dependency_job_id":"fc2930b3-bbe9-4ddc-89fc-a330c85b3d62","html_url":"https://github.com/jpbruyere/shaderc.net","commit_stats":{"total_commits":13,"total_committers":3,"mean_commits":4.333333333333333,"dds":0.3076923076923077,"last_synced_commit":"07b286d4528bc15930e20311a1a858f56db82f0d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbruyere%2Fshaderc.net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbruyere%2Fshaderc.net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbruyere%2Fshaderc.net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbruyere%2Fshaderc.net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpbruyere","download_url":"https://codeload.github.com/jpbruyere/shaderc.net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228425984,"owners_count":17917779,"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":["binding","csharp","net","opengl","shader","shaderc","vulkan"],"created_at":"2024-12-07T02:07:42.404Z","updated_at":"2025-08-03T14:32:10.711Z","avatar_url":"https://github.com/jpbruyere.png","language":"C#","funding_links":["https://www.paypal.me/GrandTetraSoftware"],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.nuget.org/packages/shaderc.net\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/shaderc.net\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://ci.appveyor.com/project/jpbruyere/shaderc-net\"\u003e\n    \u003cimg src=\"https://img.shields.io/appveyor/ci/jpbruyere/shaderc-net?logo=appveyor\u0026logoColor=lightgrey\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/GrandTetraSoftware\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-green.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# shaderc.net\n\nNet bindings for [google shaderc](https://github.com/google/shaderc).\n\n#### spirv compilation\nThis sample use [vk.net](https://github.com/jpbruyere/vk.net) to create the shader module.\nOn success, `Result` object will hold a native pointer on the generated spirv code suitable for the `ShaderModuleCreateInfo` pCode field. This pointer will stay valid until the `Result` disposal.\n\n```csharp\nusing (Compiler comp = new Compiler ()) {\n  using (Result res = comp.Compile (\"test.vert\", ShaderKind.VertexShader)) {\n    if (res.Status == Status.Success) {\n      VkShaderModuleCreateInfo ci = VkShaderModuleCreateInfo.New ();\n      ci.codeSize = res.codeSize;\n      ci.pCode = res.code;\n      vkCreateShaderModule (VkDev, ref moduleCreateInfo, IntPtr.Zero, out VkShaderModule shaderModule));\n```\n\n#### Resolving includes\n**shaderc** library provide the ability to add `#include` statements as in **c/c++**. This functionality is enabled or not in the `Options` class constructor, the default is enabled.\n```csharp\nOptions opt = new Options(false);\n```\nA default `Options` instance is created by the `Compiler` constructor which enable the include resolution. You may provide a custom Options instance to the compiler constructor.\n```csharp\nCompiler comp = new Compiler (opt);\ncomp.Options.InvertY = true;\n```\nAs in **c/c++**, you may have local or global include (enclosed in \"\" or \u003c\u003e). Local includes enclosed in \"\" will be searched from the current parsed source file. Global includes enclosed in '\u003c\u003e' will be searched in directories listed in ```Options.IncludeDirectories```. The pathes may be relative to the executable directory, or absolute.\n```csharp\ncomp.Options.IncludeDirectories.AddRange (\"shaders\", @\"c:\\test\");\n```\nIf you want to override the default include resolution, to search for embedded ressources for example, derive the `Options` class and override the `TryFindInclude` method.\n```csharp\nclass OptionsWithCustomIncResolve : Options {\n  protected override bool TryFindInclude (string sourcePath, string includePath, IncludeType incType, out string incFile, out string incContent) {\n...\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbruyere%2Fshaderc.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpbruyere%2Fshaderc.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbruyere%2Fshaderc.net/lists"}