java3d
  1. java3d
  2. JAVA3D-552

Add shader bindings to indicate which light slots are enabled

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6.0
    • Component/s: j3d-core
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      552

      Description

      GLSL provides access to some of the native OpenGL state information. Some of
      this information appertains to light sources and corresponding parameters.
      Unfortunately, state information about whether a light source is enabled is not
      provided (which baffles me). This means that the calls glEnable() and
      glDisable() do not set any state information that can be accessed by a GLSL
      programmable shader.

      Java3D dynamically moves light nodes in and out of available light slots
      depending upon:

      1. API calls to setEnable()
      2. attachment to a scene graph
      3. intersection of the camera with light influencing bounds.

      The consequences of this management system are:

      1. It is not guaranteed that a light source will be allocated to the same
      light slot across multiple rendering requests.
      2. Automatic disabling of a light source due to the camera not intersecting
      its influencing bounds does cannot be detected by a shader program. No
      information is passed into the shader that can be used to act upon this activity.

      Propose an enhancement to provide shader bindings that indicate which light
      slots are currently enabled. This state information ought to reflect both
      application developer and internal system management actions.

      A recommended approach might be to pass in something like:

      uniform bool lightSourceEnabled[gl_MaxLights]

      Where each index in the array corresponds to GL_LIGHT0 + index. The application
      developer could then access the array using a ShaderAttributeBinding.

        Activity

        Hide
        kcr added a comment -

        Set target milestone to 1.6.0

        Show
        kcr added a comment - Set target milestone to 1.6.0

          People

          • Assignee:
            java3d-issues
            Reporter:
            bheffner75
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: