Class ShaderPass
- Namespace
- HelixToolkit.SharpDX.Shaders
- Assembly
- HelixToolkit.SharpDX.dll
Shader Pass
public sealed class ShaderPass : DisposeObject, IDisposable
- Inheritance
-
ShaderPass
- Implements
- Inherited Members
Constructors
ShaderPass(ShaderPassDescription, IEffectsManager?)
public ShaderPass(ShaderPassDescription passDescription, IEffectsManager? manager)
Parameters
passDescriptionShaderPassDescriptionmanagerIEffectsManager
Fields
NullPass
public static readonly ShaderPass NullPass
Field Value
Properties
BlendFactor
Gets or sets the blend factor.
public Color4 BlendFactor { get; }
Property Value
- Color4
The blend factor.
BlendState
public BlendStateProxy BlendState { get; }
Property Value
ComputeShader
public ComputeShader ComputeShader { get; }
Property Value
DepthStencilState
public DepthStencilStateProxy DepthStencilState { get; }
Property Value
DomainShader
public DomainShader DomainShader { get; }
Property Value
GeometryShader
public GeometryShader GeometryShader { get; }
Property Value
HullShader
public HullShader HullShader { get; }
Property Value
IsNULL
public bool IsNULL { get; }
Property Value
Layout
Gets or sets the input layout. This is customized layout used for this ShaderPass only. If this is not set, default is using Layout from InputLayoutDescription
public InputLayoutProxy? Layout { get; }
Property Value
- InputLayoutProxy
The input layout.
Name
public string Name { get; }
Property Value
PixelShader
public PixelShader PixelShader { get; }
Property Value
RasterState
public RasterizerStateProxy RasterState { get; }
Property Value
SampleMask
Gets or sets the sample mask.
public int SampleMask { get; }
Property Value
- int
The sample mask.
StencilRef
Gets or sets the stencil reference.
public int StencilRef { get; }
Property Value
- int
The stencil reference.
Topology
Gets or sets the topology.
public PrimitiveTopology Topology { get; set; }
Property Value
- PrimitiveTopology
The topology.
VertexShader
public VertexShader VertexShader { get; }
Property Value
Methods
BindShader(DeviceContextProxy, bool)
Bind shaders and its constant buffer for this technique
public void BindShader(DeviceContextProxy context, bool bindConstantBuffer = true)
Parameters
contextDeviceContextProxybindConstantBufferbool
BindStates(DeviceContextProxy, StateType)
Binds the states.
public void BindStates(DeviceContextProxy context, StateType type)
Parameters
contextDeviceContextProxyThe context.
typeStateTypeThe type.
GetShader(ComputeShaderType)
Gets the shader.
public ComputeShader GetShader(ComputeShaderType type)
Parameters
typeComputeShaderTypeThe type.
Returns
GetShader(DomainShaderType)
Gets the shader.
public DomainShader GetShader(DomainShaderType type)
Parameters
typeDomainShaderTypeThe type.
Returns
GetShader(GeometryShaderType)
Gets the shader.
public GeometryShader GetShader(GeometryShaderType type)
Parameters
typeGeometryShaderTypeThe type.
Returns
GetShader(HullShaderType)
Gets the shader.
public HullShader GetShader(HullShaderType type)
Parameters
typeHullShaderTypeThe type.
Returns
GetShader(PixelShaderType)
Gets the shader.
public PixelShader GetShader(PixelShaderType type)
Parameters
typePixelShaderTypeThe type.
Returns
GetShader(ShaderStage)
public ShaderBase? GetShader(ShaderStage type)
Parameters
typeShaderStage
Returns
GetShader(VertexShaderType)
Gets the shader.
public VertexShader GetShader(VertexShaderType type)
Parameters
typeVertexShaderTypeThe type.
Returns
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
SetShader(ShaderBase)
Sets the shader.
public void SetShader(ShaderBase shader)
Parameters
shaderShaderBaseThe shader.
SetState(BlendStateDescription?)
Sets the state.
public void SetState(BlendStateDescription? blendStateDesc)
Parameters
blendStateDescBlendStateDescription?The blend state desc.
SetState(DepthStencilStateDescription?)
Sets the state.
public void SetState(DepthStencilStateDescription? depthStencilStateDesc)
Parameters
depthStencilStateDescDepthStencilStateDescription?The depth stencil state desc.
SetState(RasterizerStateDescription?)
Sets the state.
public void SetState(RasterizerStateDescription? rasterizerStateDesc)
Parameters
rasterizerStateDescRasterizerStateDescription?The rasterizer state desc.