self:get_code

Client

Retrieves the compiled GLSL source code of the shader


Syntax

local result = self:get_code()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
stringresultCurrent compiled GLSL source code of the shader

Examples

Print the source code of a shader
local entity = core.shader.create("assets/shaders/ripple.glsl", core.shader.shader_mode.CANVAS_ITEM)

core.engine.print("info", "Shader code:", entity:get_code())

On this page