IRenderEffectParameters

Description

interface Tinman.Engine.Rendering.IRenderEffectParameters

Derived from

IRenderEffectBase

Extended by

ITerrainEffect
RenderEffect abstract

Base interface for classes that represent a render effect that provides a standardized set of low-level parameter slots, which may be used across different rendering APIs.

Low-level parameter slots are declared by calling the RenderEffectParameters.Declare method on the RenderEffectParameters object that is owned by a render effect. Usually, this is done in the constructor of the respective implementation class of the IRenderEffectParameters interface.

Each low-level parameter slot may be declared only once. However, declaring the same parameter multiple times (i.e. repeatedly calling the ParameterDeclare method with identical arguments) is allowed.

When writing values to low-level parameters, the slot index -1 may be passed. In this case, the respective method will return silently. This simplifies handling of low-level parameters that are available conditionally.

Public / Methods

Parameter​Buffer


public method ParameterBuffer → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

buffer in : IGpuBuffer

The buffer to set.

Writes a value into a low-level parameter slot.

Parameter​Declare


public method ParameterDeclare → (3)

type in : RenderEffectParameterType

The parameter type.

name in : string

[not-empty]
The parameter name.

size opt : int32 = 0

[>=0]
The parameter array size or 0 for non-arrays.

returns → int32

The slot index of the declared low-level parameter.

Declares a low-level parameter slot, which allows an implementation to verify that the given parameter information corresponds to the actual parameter declaration in the compiled shader program.

It is valid to declare the same parameter multiple times. In this case, the same slot index will be returned for each method call. Two parameters are considered to be the same if their names are equal.

RenderException

If another parameter with the given name in has already been defined with a different type in and/or size opt or if a graphics subsystem error has occurred.

Parameter​Float


public method ParameterFloat → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : float32

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Index


[Pure]
public method ParameterIndex → (1)

name in : string

The parameter name that has been passed to ParameterDeclare.

returns → int32

The index of the low-level parameter slot or -1 if name in does not match the name of a declared parameter.

Returns the index of a declared low-level parameter slot.

Parameter​Info


[Pure]
public method ParameterInfo → (1)

slot in : int32

[0..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot index.

returns → ParameterSlot

The information or null if not declared.

Returns information about a declared low-level parameter slot.

Parameter​Int


public method ParameterInt → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : int32

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Matrix2x2


public method ParameterMatrix2x2 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Mat2F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Matrix3x3


public method ParameterMatrix3x3 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Mat3F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Matrix3x4


public method ParameterMatrix3x4 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Mat4F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Matrix4x4


public method ParameterMatrix4x4 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Mat4F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Texture

2 overloads


public method ParameterTexture1 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

texture in : ITexture2D

The texture to set.

Writes a value into a low-level parameter slot.


public method ParameterTexture2 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

texture in : ITextureCube

The texture to set.

Writes a value into a low-level parameter slot.

Parameter​Texture​Null


public method ParameterTextureNull → (2)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

Writes a null value into a low-level parameter slot.

Parameter​Usage


[Pure]
public method ParameterUsage → (2)

slot in : int32

[0..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot.

pass in : int32

[0..IRenderEffectBase.PassCount-1]
The render pass index.

returns → bool

true if the low-level parameter slot is used by pass in, false if not.

Returns whether the given low-level parameter slot is used by the given pass or not.

Parameter​Usages


[Pure]
public method ParameterUsages → ()

returns → ParameterSlotUsage [ ]

The usages.

Returns the low-level parameter slot usages.

Parameter​Vector2


public method ParameterVector2 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Vec2F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Vector3


public method ParameterVector3 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Vec3F

The parameter value.

Writes a value into a low-level parameter slot.

Parameter​Vector4


public method ParameterVector4 → (3)

slot in : int32

[-1..IRenderEffectParameters.ParameterSlotCount-1]
The parameter slot or -1 to skip.

element in : int32

[>=0]
The parameter element index.

value in : Vec4F

The parameter value.

Writes a value into a low-level parameter slot.

Public / Attributes

Parameter​Slot​Count


public attribute ParameterSlotCount → (get)

value : int32

[>=0]
The number of parameter slots.

The number of low-level parameter slots.