self:get_mode

Client

Retrieves the rendering pipeline mode the shader was compiled for


Syntax

local result = self:get_mode()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
core.shader.shader_moderesultCurrent rendering pipeline mode of the shader

Examples

Get the mode of a shader instance
local entity = core.shader.create("assets/shaders/ripple.glsl", core.shader.shader_mode.CANVAS_ITEM)

core.engine.print("info", "Shader mode:", entity:get_mode())

On this page