Class GBuffer


  • public class GBuffer
    extends FrameBufferObject
    Class that represent a gBuffer fbo for deferred rendering
    Author:
    Darius Dinger
    • Constructor Detail

      • GBuffer

        public GBuffer()
        Creates new gBuffer with the size of the glfw window
    • Method Detail

      • getColorBuffer

        public int getColorBuffer()
        Returns:
        GBuffers color buffer texture id
      • getPositionBuffer

        public int getPositionBuffer()
        Returns:
        GBuffers position buffer texture id
      • getNormalBuffer

        public int getNormalBuffer()
        Returns:
        GBuffers normal buffer texture id
      • getVariable0Buffer

        public int getVariable0Buffer()
        Getting variable0 gbuffer attachment texture.
        Red component = How much effected by lighting
        Green component = How much effected by fog
        Blue component = Ambient occlusion
        Returns:
        GBuffers variable0 buffer texture id
      • getVariable1Buffer

        public int getVariable1Buffer()
        Getting variable1 gbuffer attachment texture.
        Red component = How much reflective
        Green component = How much damping shine
        Blue component = use fake lighting in diffuse lighting (normal=(0, 1, 0))
        Returns:
        GBuffers variable1 buffer texture id
      • getPickingBuffer

        public int getPickingBuffer()
        Returns:
        GBuffers picking buffer texture id
      • getGlowingBuffer

        public int getGlowingBuffer()
        Returns:
        GBuffers glowing buffer texture id
      • getSunBuffer

        public int getSunBuffer()
        Returns:
        GBuffers sun buffer texture id