Yotsuba Shader
Documentation

Tutorial

Typed shader parameters for your engine

A clearly separated engine-side design example, without assuming a generated runtime parameter API.

Typed CPU wrappers#

An engine can expose typed C# properties that forward values to its existing shader-parameter API. That wrapper is engine application code, not an implemented YotsubaShader runtime or generated parameter layer.

C#
public interface IExposureParameters
{
    float Exposure { get; set; }
}

public sealed class ExposureController(IExposureParameters parameters)
{
    public void SetExposure(float value)
    {
        parameters.Exposure = value;
    }
}

The example defines its own interface and does not upload data or compile shaders. To connect it to a GPU resource, implement it against your engine and agree on layout and bindings. ShaderIgnore exists as an attribute, but comprehensive filtering of arbitrary CPU members is not implemented by the current processor.

Copyright © 2026 Yotsuba Shader contributors · Licensing · GitHub