Class ShaderAssetBase
Base class for assets that can contain shader.
Inheritance
ShaderAssetBase
Assembly: FlaxEngine.dll
File: Engine/Graphics/Shaders/Cache/ShaderAssetBase.h
Syntax
public class ShaderAssetBase
Fields
_shaderHeader
Declaration
protected ShaderStorage::Header _shaderHeader
Field Value
ShaderStorage::Header
|
Methods
GetCacheChunkIndex()
Gets internal shader cache chunk index (for current GPU device shader profile).
Declaration
public static int32 GetCacheChunkIndex()
Returns
int32
|
GetCacheChunkIndex(ShaderProfile profile)
Gets internal shader cache chunk index.
Declaration
public static int32 GetCacheChunkIndex(ShaderProfile profile)
Parameters
ShaderProfile
profile
Shader profile |
Returns
int32
Chunk index |
GetShaderAsset()
Gets the parent asset.
Declaration
protected virtual BinaryAsset* GetShaderAsset() const = 0
Returns
BinaryAsset
|
initBase(AssetInitData& initData)
Declaration
protected bool initBase(AssetInitData& initData)
Parameters
AssetInitData
initData
|
Returns
bool
|
InitCompilationOptions(struct ShaderCompilationOptions& options)
Prepare shader compilation options.
Declaration
public virtual void InitCompilationOptions(struct ShaderCompilationOptions& options)
Parameters
struct ShaderCompilationOptions
options
The output options. |
IsNullRenderer()
Declaration
public static bool IsNullRenderer()
Returns
bool
|
LoadShaderCache(ShaderCacheResult& result)
Loads shader cache (it may call compilation or gather precached data).
Declaration
protected bool LoadShaderCache(ShaderCacheResult& result)
Parameters
ShaderCacheResult
result
The output data. |
Returns
bool
True if cannot load data, otherwise false. |
RegisterForShaderReloads(Asset* asset, const ShaderCacheResult& shaderCache)
Registers shader asset for the automated reloads on source includes changes.
Declaration
protected void RegisterForShaderReloads(Asset* asset, const ShaderCacheResult& shaderCache)
Parameters
Asset
asset
The asset. |
ShaderCacheResult
shaderCache
The loaded shader cache. |
SaveShaderAsset()
Saves this shader asset to the storage container.
Declaration
protected bool SaveShaderAsset() const
Returns
bool
True if failed, otherwise false. |
UnregisterForShaderReloads(Asset* asset)
Unregisters shader asset from the automated reloads on source includes changes.
Declaration
protected void UnregisterForShaderReloads(Asset* asset)
Parameters
Asset
asset
The asset. |