Table of Contents

Class MappedSksl

Namespace
ShadowDusk.Compiler.Sksl
Assembly
ShadowDusk.Compiler.dll

The mapped SkSL plus everything the consumer must know to run it.

public sealed record MappedSksl : IEquatable<MappedSksl>
Inheritance
MappedSksl
Implements
Inherited Members

Constructors

MappedSksl(string, IReadOnlyList<ShaderError>, IReadOnlyList<string>, IReadOnlyList<string>)

The mapped SkSL plus everything the consumer must know to run it.

public MappedSksl(string SkslText, IReadOnlyList<ShaderError> Warnings, IReadOnlyList<string> ChildShaders, IReadOnlyList<string> SynthesizedUniforms)

Parameters

SkslText string

The SkSL runtime-effect source.

Warnings IReadOnlyList<ShaderError>

Non-fatal findings (synthesized uniforms, substituted varyings).

ChildShaders IReadOnlyList<string>

The uniform shader children, in declaration order — one per (texture, sampler) pair the HLSL sampled, named after the HLSL texture. The consumer binds each with SKRuntimeEffect.Uniforms/children before creating the paint.

SynthesizedUniforms IReadOnlyList<string>

Uniforms the mapping had to invent (ShadowDusk_Color for COLOR0, ShadowDusk_Resolution, or a varying substituted per TreatVaryingsAsUniforms). The consumer must set every one of these each frame or the effect renders wrong — which is why each also carries a warning.

Properties

ChildShaders

The uniform shader children, in declaration order — one per (texture, sampler) pair the HLSL sampled, named after the HLSL texture. The consumer binds each with SKRuntimeEffect.Uniforms/children before creating the paint.

public IReadOnlyList<string> ChildShaders { get; init; }

Property Value

IReadOnlyList<string>

SkslText

The SkSL runtime-effect source.

public string SkslText { get; init; }

Property Value

string

SynthesizedUniforms

Uniforms the mapping had to invent (ShadowDusk_Color for COLOR0, ShadowDusk_Resolution, or a varying substituted per TreatVaryingsAsUniforms). The consumer must set every one of these each frame or the effect renders wrong — which is why each also carries a warning.

public IReadOnlyList<string> SynthesizedUniforms { get; init; }

Property Value

IReadOnlyList<string>

Warnings

Non-fatal findings (synthesized uniforms, substituted varyings).

public IReadOnlyList<ShaderError> Warnings { get; init; }

Property Value

IReadOnlyList<ShaderError>