Class PBRShaderConfig

java.lang.Object
gaiasky.util.gdx.shader.DefaultIntShader.Config
gaiasky.util.gdx.model.gltf.scene3d.shaders.PBRShaderConfig

public class PBRShaderConfig extends DefaultIntShader.Config
  • Field Details

    • manualSRGB

      public PBRShaderConfig.SRGB manualSRGB
      Enable conversion of SRGB space textures into linear space in shader. Should be PBRShaderConfig.SRGB.NONE if your textures are already in linear space or automatically converted by OpenGL when using GL30.GL_SRGB format.
    • transmissionSRGB

      public PBRShaderConfig.SRGB transmissionSRGB
      Enable conversion of SRGB space frame buffer into linear space in shader for transmission source. Should be PBRShaderConfig.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

      public PBRShaderConfig.SRGB mirrorSRGB
      Enable conversion of SRGB space frame buffer into linear space in shader for mirror source. Should be PBRShaderConfig.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 manualGammaCorrection
      Enable/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_GAMMA
      Default gamma factor that gives good results on most monitors.
      See Also:
    • gamma

      public float gamma
      Gamma value used when manualGammaCorrection is enabled. Default is 2.2 which is a standard value that gives good results on most monitors
    • glslVersion

      public String glslVersion
      string to prepend to shaders (version), automatic if null
    • numVertexColors

      public int numVertexColors
      Max vertex color layers. Default PBRShader only use 1 layer, custom shaders can implements more.
    • prefix

      public String prefix
      Some custom GLSL code to inject in shaders. If not null it will be added after #version
  • Constructor Details

    • PBRShaderConfig

      public PBRShaderConfig()