GLSLToDeviceCompatibleGLSL

Processes the GLSL output of the shader cross compiler to get GLSL that can be compiled on a platform with the specified capabilities.

Windows
MacOS
Linux

References

Module

OpenGLDrv

Header

/Engine/Source/Runtime/OpenGLDrv/Public/OpenGLShaders.h

Include

#include "OpenGLShaders.h"

Source

/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLShaders.cpp

Syntax

void GLSLToDeviceCompatibleGLSL
(
    FAnsiCharArray & GlslCodeOriginal,
    const FString & ShaderName,
    GLenum TypeEnum,
    const FOpenGLShaderDeviceCapabilities & Capabilities,
    FAnsiCharArray & GlslCode
)

Remarks

Processes the GLSL output of the shader cross compiler to get GLSL that can be compiled on a platform with the specified capabilities. Works around inconsistencies between OpenGL implementations, including lack of support for certain extensions and drivers with non-conformant behavior.

Parameters

Parameter

Description

GlslCodeOriginal

[in,out] GLSL output from shader cross compiler to be modified. Process is destructive; pass in a copy if still need original!

ShaderName

[in] Shader name

TypeEnum

[in] Type of shader (GL[VERTEX, FRAGMENT, GEOMETRY, TESS_CONTROL, TESS_EVALUATION]SHADER)

Capabilities

[in] GL Device capabilities

GlslCode

[out] Compilable GLSL

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss