Module gl1

Class GLSLLightShader

All Implemented Interfaces:
GLSLOpenGLObject
Direct Known Subclasses:
GLSLAreaLight, GLSLDirectionalLight, GLSLPointLight, GLSLSkyReflectionLight, GLSLSpotLight

public abstract class GLSLLightShader extends GLSLManagedShader
Convention: If ambient is set to less than -1.0 the pixel should not be lit, only its diffuse color will be used to render it.
Author:
Konni Hartmann
  • Field Details

    • stdV

      public static final String[] stdV
    • spec

      protected Spectrum3f spec
      Used for working with radiant power
  • Constructor Details

    • GLSLLightShader

      public GLSLLightShader()
  • Method Details

    • getLightShaderConfig

      public LightShaderConfiguration getLightShaderConfig()
    • setupDynamicUniforms

      protected void setupDynamicUniforms(javax.media.opengl.GL gl, GLSLDisplay disp, Object data, int shaderNo)
      Description copied from class: GLSLShader
      Function that loads uniforms of the represented Shader.
      Overrides:
      setupDynamicUniforms in class GLSLShader
      disp - GLSLDisplay that tries using this shader
      data - The GroIMP-Shader-Object represented by this shader.
    • setupShader

      protected void setupShader(javax.media.opengl.GL gl, GLSLDisplay disp, Object data)
      Overrides:
      setupShader in class GLSLShader
    • getLightFunction

      public String getLightFunction()
      Sets middle part of a light shader (after properties have been extracted from deferred-shading-textures
      Returns:
    • getVertexShader

      protected String[] getVertexShader(Object sh)
      Overrides:
      getVertexShader in class GLSLShader
      Returns:
    • canDisplayShadows

      public boolean canDisplayShadows()
    • toString

      public String toString()
      Overrides:
      toString in class Object