Class ShadersCompilation
Shaders compilation service allows to compile shader source code for a desire platform. Supports multi-threading.
Inheritance
ShadersCompilation
Assembly: FlaxEngine.dll
File: Engine/ShadersCompilation/ShadersCompilation.h
Syntax
public class ShadersCompilation
Methods
CompactShaderPath(StringView path)
Declaration
public static String CompactShaderPath(StringView path)
Parameters
StringView
path
|
Returns
String
|
Compile(ShaderCompilationOptions& options)
Compiles the shader.
Declaration
public static bool Compile(ShaderCompilationOptions& options)
Parameters
ShaderCompilationOptions
options
Compilation options |
Returns
bool
True if failed, otherwise false |
ExtractShaderIncludes(byte* shaderCache, int32 shaderCacheLength, Array<String>& includes)
Reads the included shader files stored in the shader cache data.
Declaration
public static void ExtractShaderIncludes(byte* shaderCache, int32 shaderCacheLength, Array<String>& includes)
Parameters
byte
shaderCache
The shader cache data. |
int32
shaderCacheLength
The shader cache data length (in bytes). |
Array<String>
includes
The output included. |
RegisterForShaderReloads(Asset* asset, const String& includedPath)
Registers shader asset for the automated reloads on source includes changes. </summary The asset. The included file path.
Declaration
public static void RegisterForShaderReloads(Asset* asset, const String& includedPath)
Parameters
Asset
asset
|
String
includedPath
|
ResolveShaderPath(StringView path)
Declaration
public static String ResolveShaderPath(StringView path)
Parameters
StringView
path
|
Returns
String
|
UnregisterForShaderReloads(Asset* asset)
Unregisters shader asset from the automated reloads on source includes changes.
Declaration
public static void UnregisterForShaderReloads(Asset* asset)
Parameters
Asset
asset
The asset. |