Class AtmosphereShader

  • All Implemented Interfaces:
    com.badlogic.gdx.utils.Disposable, IntShader

    public class AtmosphereShader
    extends BaseIntShader
    • Field Detail

      • implementedFlags

        protected static long implementedFlags
      • u_projTrans

        public final int u_projTrans
      • u_viewTrans

        public final int u_viewTrans
      • u_projViewTrans

        public final int u_projViewTrans
      • u_cameraPosition

        public final int u_cameraPosition
      • u_cameraDirection

        public final int u_cameraDirection
      • u_cameraUp

        public final int u_cameraUp
      • u_cameraNearFar

        public final int u_cameraNearFar
      • u_cameraK

        public final int u_cameraK
      • u_worldTrans

        public final int u_worldTrans
      • u_viewWorldTrans

        public final int u_viewWorldTrans
      • u_projViewWorldTrans

        public final int u_projViewWorldTrans
      • u_normalMatrix

        public final int u_normalMatrix
      • fAlpha

        public final int fAlpha
      • fCameraHeight

        public final int fCameraHeight
      • fCameraHeight2

        public final int fCameraHeight2
      • fOuterRadius

        public final int fOuterRadius
      • fOuterRadius2

        public final int fOuterRadius2
      • fInnerRadius

        public final int fInnerRadius
      • fInnerRadius2

        public final int fInnerRadius2
      • fKrESun

        public final int fKrESun
      • fKmESun

        public final int fKmESun
      • fKr4PI

        public final int fKr4PI
      • fKm4PI

        public final int fKm4PI
      • fScale

        public final int fScale
      • fScaleDepth

        public final int fScaleDepth
      • fScaleOverScaleDepth

        public final int fScaleOverScaleDepth
      • nSamples

        public final int nSamples
      • fSamples

        public final int fSamples
      • g

        public final int g
      • g2

        public final int g2
      • v3PlanetPos

        public final int v3PlanetPos
      • v3LightPos

        public final int v3LightPos
      • v3CameraPos

        public final int v3CameraPos
      • v3InvWavelength

        public final int v3InvWavelength
      • u_vc

        public final int u_vc
      • u_velDir

        public final int u_velDir
      • u_hterms

        public final int u_hterms
      • u_gw

        public final int u_gw
      • u_gwmat3

        public final int u_gwmat3
      • u_ts

        public final int u_ts
      • u_omgw

        public final int u_omgw
      • attributesMask

        protected final long attributesMask
        The attributes that this shader supports
    • Method Detail

      • getDefaultVertexShader

        public static java.lang.String getDefaultVertexShader()
      • getDefaultFragmentShader

        public static java.lang.String getDefaultFragmentShader()
      • init

        public void init()
        Description copied from interface: IntShader
        Initializes the IntShader, must be called before the IntShader can be used. This typically compiles a ShaderProgram, fetches uniform locations and performs other preparations for usage of the IntShader.
      • createPrefix

        public static java.lang.String createPrefix​(IntRenderable renderable)
      • canRender

        public boolean canRender​(IntRenderable renderable)
        Description copied from interface: IntShader
        Checks whether this shader is intended to render the IntRenderable. Use this to make sure a call to the IntShader.render(IntRenderable) method will succeed. This is expected to be a fast, non-blocking method. Note that this method will only return true if it is intended to be used. Even when it returns false the IntShader might still be capable of rendering, but it's not preferred to do so.
        Parameters:
        renderable - The renderable to check against this shader.
        Returns:
        true if this shader is intended to render the IntRenderable, false otherwise.
      • compareTo

        public int compareTo​(IntShader other)
        Description copied from interface: IntShader
        Compare this shader against the other, used for sorting, light weight shaders are rendered first.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • begin

        public void begin​(com.badlogic.gdx.graphics.Camera camera,
                          com.badlogic.gdx.graphics.g3d.utils.RenderContext context)
        Description copied from interface: IntShader
        Initializes the context for exclusive rendering by this shader. Use the IntShader.render(IntRenderable) method to render a IntRenderable. When done rendering the IntShader.end() method must be called.
        Specified by:
        begin in interface IntShader
        Overrides:
        begin in class BaseIntShader
        Parameters:
        camera - The camera to use when rendering
        context - The context to be used, which must be exclusive available for the shader until the call to the IntShader.end() method.
      • bindMaterial

        protected void bindMaterial​(IntRenderable renderable)
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
        Overrides:
        dispose in class BaseIntShader
      • getDefaultCullFace

        public int getDefaultCullFace()
      • setDefaultCullFace

        public void setDefaultCullFace​(int cullFace)
      • getDefaultDepthFunc

        public int getDefaultDepthFunc()
      • setDefaultDepthFunc

        public void setDefaultDepthFunc​(int depthFunc)