Table of Contents

Class RaylibSampler

Namespace
ShadowDusk.Compiler.Raylib
Assembly
ShadowDusk.Compiler.dll

One sampler2D of a RaylibShader.

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

Constructors

RaylibSampler(string, string, string, bool, IReadOnlyDictionary<string, string>)

One sampler2D of a RaylibShader.

public RaylibSampler(string UniformName, string HlslTextureName, string HlslSamplerName, bool BoundByDrawCall, IReadOnlyDictionary<string, string> BakedSamplerState)

Parameters

UniformName string

The GLSL uniform. texture0 for the sampler on texture unit 0 (the one MonoGame's SpriteBatch.Draw binds, and the one raylib's draw call binds); any other sampler keeps its HLSL texture's name and is bound with SetShaderValueTexture.

HlslTextureName string

The HLSL texture behind the sampler.

HlslSamplerName string

The HLSL sampler object.

BoundByDrawCall bool

True for texture0: the texture passed to the draw call.

BakedSamplerState IReadOnlyDictionary<string, string>

The sampler_state entries the .fx bakes (e.g. Filter = Point). A raylib shader cannot carry them, because raylib keeps filtering and addressing on the Texture2D; apply them with SetTextureFilter/SetTextureWrap.

Properties

BakedSamplerState

The sampler_state entries the .fx bakes (e.g. Filter = Point). A raylib shader cannot carry them, because raylib keeps filtering and addressing on the Texture2D; apply them with SetTextureFilter/SetTextureWrap.

public IReadOnlyDictionary<string, string> BakedSamplerState { get; init; }

Property Value

IReadOnlyDictionary<string, string>

BoundByDrawCall

True for texture0: the texture passed to the draw call.

public bool BoundByDrawCall { get; init; }

Property Value

bool

HlslSamplerName

The HLSL sampler object.

public string HlslSamplerName { get; init; }

Property Value

string

HlslTextureName

The HLSL texture behind the sampler.

public string HlslTextureName { get; init; }

Property Value

string

UniformName

The GLSL uniform. texture0 for the sampler on texture unit 0 (the one MonoGame's SpriteBatch.Draw binds, and the one raylib's draw call binds); any other sampler keeps its HLSL texture's name and is bound with SetShaderValueTexture.

public string UniformName { get; init; }

Property Value

string