Class PBRShaderConfig
java.lang.Object
gaiasky.util.gdx.shader.DefaultIntShader.Config
gaiasky.util.gdx.model.gltf.scene3d.shaders.PBRShaderConfig
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
Default gamma factor that gives good results on most monitors.float
Gamma value used whenmanualGammaCorrection
is enabled.string to prepend to shaders (version), automatic if nullboolean
Enable/Disable gamma correction.Enable conversion of SRGB space textures into linear space in shader.Enable conversion of SRGB space frame buffer into linear space in shader for mirror source.int
Max vertex color layers.Some custom GLSL code to inject in shaders.Enable conversion of SRGB space frame buffer into linear space in shader for transmission source.Fields inherited from class gaiasky.util.gdx.shader.DefaultIntShader.Config
defaultCullFace, defaultDepthFunc, fragmentShaderCode, fragmentShaderFile, numBones, numDirectionalLights, numPointLights, numSpotLights, vertexShaderCode, vertexShaderFile
-
Constructor Summary
-
Method Summary
-
Field Details
-
manualSRGB
Enable conversion of SRGB space textures into linear space in shader. Should bePBRShaderConfig.SRGB.NONE
if your textures are already in linear space or automatically converted by OpenGL when usingGL30.GL_SRGB
format. -
transmissionSRGB
Enable conversion of SRGB space frame buffer into linear space in shader for transmission source. Should bePBRShaderConfig.SRGB.NONE
if the transmission frame buffer is already in linear space. By default, transmission source is considered rendered with gamma correction (sRGB space). -
mirrorSRGB
Enable conversion of SRGB space frame buffer into linear space in shader for mirror source. Should bePBRShaderConfig.SRGB.NONE
if the mirror frame buffer is already in linear space. By default, mirror source is considered rendered with gamma correction (sRGB space). -
manualGammaCorrection
public boolean manualGammaCorrectionEnable/Disable gamma correction. Since gamma correction should only be done once as a final step, this should be disabled when you want to apply it later (eg. in case of post process lighting calculation). It also should be disabled when drawing to SRGB framebuffers since gamma correction will be automatically done by OpenGL. Default is true. -
DEFAULT_GAMMA
public static final float DEFAULT_GAMMADefault gamma factor that gives good results on most monitors.- See Also:
-
gamma
public float gammaGamma value used whenmanualGammaCorrection
is enabled. Default is 2.2 which is a standard value that gives good results on most monitors -
glslVersion
string to prepend to shaders (version), automatic if null -
numVertexColors
public int numVertexColorsMax vertex color layers. DefaultPBRShader
only use 1 layer, custom shaders can implements more. -
prefix
Some custom GLSL code to inject in shaders. If not null it will be added after #version
-
-
Constructor Details
-
PBRShaderConfig
public PBRShaderConfig()
-