Class SkSl
- Namespace
- DrawnUi.Infrastructure
- Assembly
- DrawnUi.Maui.dll
public static class SkSl
- Inheritance
-
SkSl
- Inherited Members
Fields
CompiledCache
public static Dictionary<string, SKRuntimeEffect> CompiledCache
Field Value
Methods
Compile(string)
Will compile your SKSL shader code into SKRuntimeEffect.
public static SKRuntimeEffect Compile(string shaderCode)
Parameters
shaderCodestring
Returns
Compile(string, string, bool, Action<string>)
Will compile your SKSL shader code into SKRuntimeEffect. The filename parameter is used for debugging and caching. Do not forget to disable caching if you edit/change shader code at runtime.
public static SKRuntimeEffect Compile(string shaderCode, string filename, bool useCache = true, Action<string> onError = null)
Parameters
Returns
CreateShader(SKRuntimeEffect, SKRuntimeEffectUniforms, Dictionary<string, SKShader>)
public static SKShader CreateShader(SKRuntimeEffect compiled, SKRuntimeEffectUniforms uniforms, Dictionary<string, SKShader> textures)
Parameters
compiledSKRuntimeEffectuniformsSKRuntimeEffectUniformstexturesDictionary<string, SKShader>
Returns
LoadFromResources(string)
public static string LoadFromResources(string fileName)
Parameters
fileNamestring
Returns
LoadFromResourcesAsync(string)
public static Task<string> LoadFromResourcesAsync(string fileName)
Parameters
fileNamestring
Returns
Precompile(params string[])
public static void Precompile(params string[] filenames)
Parameters
filenamesstring[]
ThrowCompilationError(string, string, string)
public static void ThrowCompilationError(string shaderCode, string errors, string filename = null)