Codename LogoCodename Logo

funkin.backend.shaders.CustomShader

APIWikiTools

Class for custom shaders.

To create one, create a shaders folder in your assets/mod folder, then add a file named my-shader.frag or/and my-shader.vert.

Non-existent shaders will only load the default one, and throw a warning in the console.

To access the shader's uniform variables, use shader.variable

Constructor

View on GitHub

new(name:String, ?glslVersion:String)

Creates a new custom shader

Parameters:

name

Name of the frag and vert files.

glslVersion

GLSL version to use. Defaults to 120.

Variables

path:String = ""

Inherited Variables

Defined by FunkinShader

fileName:String = "FunkinShader"

fragFileName:String = "FunkinShader"

fragmentPrefix:String = ""

glslVer:String = Flags.DEFAULT_GLSL_VERSION

onGLUpdate:FlxTypedSignal<() ‑> Void> = new FlxTypedSignal<Void>()

onProcessGLData:FlxTypedSignal<(String, String) ‑> Void> = new FlxTypedSignal<String -> String>()

shaderPrefix:String = ""

vertFileName:String = "FunkinShader"

vertexPrefix:String = ""

Inherited Methods

Defined by FunkinShader

View on GitHub

hget(name:String):Dynamic

View on GitHub

hset(name:String, val:Dynamic):Dynamic