Shaders |
public byte[]? GetShaderBytes( string resourceName, bool throwExceptionIfNotFound = false )
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 Ab4d.SharpEngine assembly as an AssemblyShaderBytecodeProvider that can provide many shaders stored as embedded resources in Ab4d.SharpEngine 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.