Skip to reading
The Asset Importer

What the conversion does

Edition 0.86.3.4

Import and check models, images, animation, audio, fonts, video and shaders, with hands-on practice files.

Download PDFView illustrations

24. Godot and GLSL shaders

Figure 49. The Shader preview displays source text. It is not a live shader sphere or proof of how an effect looks on a particular object.

Supported fragment UV input is mapped to the Godot UV input; supported fragment output is adapted to Godot's output path. Familiar fragment texture calls and fragment coordinates are translated where supported. Version and precision directives can be ignored as part of that conversion.

Vertex-shader code using gl_Position, includes, Shadertoy mainImage, unsupported declarations, samplerCube and the converter's unsupported discard case need a proper rewrite rather than a different file suffix.

Source table from What the conversion does, page 68
Source situationBest next step
A small compatible fragment effectImport and inspect the converted shader, then assign it to a suitable target.
A native Godot 3D material shaderUse the spatial shader route and apply it through the object's material/shader settings.
A 2D or GUI shaderUse canvas_item or the converter's canvas marker, then choose it in the matching 2D/GUI system.
Page 68 of 86Permalink
Go to page