Click or drag to resize
AB4D logo

EffectsManagerGetShaderBytes Method

Gets bytes array of the shader byte code. Before using this method, the shader resources need to be registered with RegisterShaderResource(ShaderBytecodeProvider) method.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public virtual byte[] GetShaderBytes(
	string resourceName,
	bool throwExceptionIfNotFound = false
)

Parameters

resourceName  String
shader resource name
throwExceptionIfNotFound  Boolean  (Optional)
if true than exception will be thrown when resourceName is not found; when false null is returned in this case

Return Value

Byte
bytes array of the shader byte code
Remarks

Gets bytes array of the shader byte code. Before using this method, the shader resources need to be registered with RegisterShaderResource(ShaderBytecodeProvider) method.

EffectsManager by default registers the Ab3d.DXEngine assembly as an AssemblyShaderBytecodeProvider that can provide many shaders stored as embedded resources in Ab3d.DXEngine assembly.

You can register custom shader resources by creating your own instances of AssemblyShaderBytecodeProvider, FileShaderBytecodeProvider or DirectoryShaderBytecodeProvider or any other class that is derived from ShaderBytecodeProvider.

See Also