Header menu logo Mibo.Raylib

Shaders Module

Built-in GLSL shader generators for the Forward PBR pipeline.

Fragment shaders use uniform arrays for point lights. The array size is determined at pipeline creation time (default 8) because GLSL requires compile-time constants for array declarations.

Functions and values

Function or value Description

depthShadowFragment

Full Usage: depthShadowFragment

Returns: string
Returns: string

depthShadowVertex

Full Usage: depthShadowVertex

Returns: string
Returns: string

forwardFragmentFmt maxPointLights maxSpotLights maxShadowCasters

Full Usage: forwardFragmentFmt maxPointLights maxSpotLights maxShadowCasters

Parameters:
    maxPointLights : int
    maxSpotLights : int
    maxShadowCasters : int

Returns: string
maxPointLights : int
maxSpotLights : int
maxShadowCasters : int
Returns: string

forwardVertex

Full Usage: forwardVertex

Returns: string
Returns: string

forwardVertexInstanced

Full Usage: forwardVertexInstanced

Returns: string

Instanced variant of the forward vertex shader. Uses in mat4 instanceTransform (vertex attribute) instead of uniform mat4 matModel. The mvp uniform must be view-projection only (without model) — the per-instance model transform comes from the instanceTransform attribute.

Returns: string

loadDepthShadowShader ()

Full Usage: loadDepthShadowShader ()

Parameters:
    () : unit

Returns: Shader

Loads the depth-only shadow pass vertex + fragment shader (C example compatible).

() : unit
Returns: Shader

loadForwardInstancedShader maxPointLights maxSpotLights maxShadowCasters

Full Usage: loadForwardInstancedShader maxPointLights maxSpotLights maxShadowCasters

Parameters:
    maxPointLights : int
    maxSpotLights : int
    maxShadowCasters : int

Returns: Shader

Loads the instanced forward PBR vertex + fragment shader. Uses in mat4 instanceTransform for per-instance model transforms. The mvp uniform must be view-projection only (without model).

maxPointLights : int
maxSpotLights : int
maxShadowCasters : int
Returns: Shader

loadForwardShader maxPointLights maxSpotLights maxShadowCasters

Full Usage: loadForwardShader maxPointLights maxSpotLights maxShadowCasters

Parameters:
    maxPointLights : int
    maxSpotLights : int
    maxShadowCasters : int

Returns: Shader

Loads the built-in forward PBR vertex + fragment shader. The fragment shader is generated with the specified light and shadow array sizes.

maxPointLights : int
maxSpotLights : int
maxShadowCasters : int
Returns: Shader

loadPostProcessShader ()

Full Usage: loadPostProcessShader ()

Parameters:
    () : unit

Returns: Shader

Loads the built-in fullscreen post-process vertex + fragment shader.

() : unit
Returns: Shader

postProcessFragment

Full Usage: postProcessFragment

Returns: string
Returns: string

postProcessVertex

Full Usage: postProcessVertex

Returns: string
Returns: string

Type something to start searching.