Saturate.Renderer 0.1.0

dotnet add package Saturate.Renderer --version 0.1.0
                    
NuGet\Install-Package Saturate.Renderer -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Saturate.Renderer" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Saturate.Renderer" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Saturate.Renderer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Saturate.Renderer --version 0.1.0
                    
#r "nuget: Saturate.Renderer, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Saturate.Renderer@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Saturate.Renderer&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Saturate.Renderer&version=0.1.0
                    
Install as a Cake Tool

Saturate Renderer

A minimal, immediate-mode 3D rendering library built on NeoVeldrid (Vulkan via Veldrid). Designed for game engines and tools that want direct control over GPU resources without a scene graph getting in the way.

Features

  • Immediate-mode API — no scene graph, no ECS. You create resources, set transforms, and issue draws each frame.
  • Cameras — perspective / ortho cameras with position, rotation, and clear color.
  • Lights — point, directional, and spot lights (up to 16 per frame). Light cookies supported.
  • Materials & Shaders — vertex + fragment shaders with per-material pipeline state (culling, blend, depth). Shader stages can be added/removed at runtime.
  • Textures & Samplers — 2D, 2D arrays, 3D, cubemaps. Mipmap generation (CPU box filter). Streaming textures with zero-copy staging upload. Named per-material texture parameters.
  • Meshes — indexed triangle lists with standard vertex layout (position, normal, UV0, UV1, tangent).
  • Vulkan backend — built on NeoVeldrid's Vulkan surface; Win32 window integration.

Quick Start

using Saturate;

// 1. Initialize (hInstance = GetModuleHandle(null) on Windows)
RenderApi.Init(hInstance, hwnd, width, height);

// 2. Create resources
var cam    = RenderApi.CreateCamera();
var shader = RenderApi.CreateShader();
RenderApi.AddShaderStage(shader, "vert", ShaderStages.Vertex, vertSource);
RenderApi.AddShaderStage(shader, "frag", ShaderStages.Fragment, fragSource);

var mat  = RenderApi.CreateMaterial();
RenderApi.AddShader(mat, shader);

var mesh = RenderApi.CreateMesh();
RenderApi.SetVertices(mesh, vertices);
RenderApi.SetIndices(mesh, indices);

// 3. Per frame
RenderApi.Resize(width, height);
RenderApi.SetActiveCamera(cam);
RenderApi.SetPosition(cam, eyePosition);
RenderApi.SetRotation(cam, lookRotation);

RenderApi.SetPosition(mesh, objectPosition);
RenderApi.SetRotation(mesh, objectRotation);
RenderApi.Draw(mesh, mat);

RenderApi.Frame();

Design

Saturate uses a flat resource model: every camera, light, mesh, shader, material, texture, and sampler gets a typed handle ID. You set properties by handle, queue draws by handle, and the renderer batches them each frame. No inheritance, no component system — just direct state setting.

Binding Convention

set 0, binding 0  → CameraBlock (per-frame)
set 0, binding 1  → LightsBlock (per-frame)
set 1, binding 0  → ObjectBlock  (per-draw model matrix)
set 2             → per-material textures + sampler

Named texture parameters map to set 2, binding 1..N in declaration order. Shaders declare matching bindings with the separate sampler + texture2D form for correct Veldrid layout matching:

layout(set = 2, binding = 0) uniform sampler matSampler;
layout(set = 2, binding = 1) uniform texture2D Albedo;
vec4 color = texture(sampler2D(Albedo, matSampler), fsUV);

Requirements

  • .NET 10.0
  • Windows (Win32 Vulkan surface)
  • A Vulkan-capable GPU with up-to-date drivers

License

Apache 2.0 — see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 104 7/16/2026