Class RaylibSampler
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
UniformNamestringThe GLSL uniform.
texture0for the sampler on texture unit 0 (the one MonoGame'sSpriteBatch.Drawbinds, and the one raylib's draw call binds); any other sampler keeps its HLSL texture's name and is bound withSetShaderValueTexture.HlslTextureNamestringThe HLSL texture behind the sampler.
HlslSamplerNamestringThe HLSL sampler object.
BoundByDrawCallboolTrue for
texture0: the texture passed to the draw call.BakedSamplerStateIReadOnlyDictionary<string, string>The
sampler_stateentries the.fxbakes (e.g.Filter = Point). A raylib shader cannot carry them, because raylib keeps filtering and addressing on theTexture2D; apply them withSetTextureFilter/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
BoundByDrawCall
True for texture0: the texture passed to the draw call.
public bool BoundByDrawCall { get; init; }
Property Value
HlslSamplerName
The HLSL sampler object.
public string HlslSamplerName { get; init; }
Property Value
HlslTextureName
The HLSL texture behind the sampler.
public string HlslTextureName { get; init; }
Property Value
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; }