Class Texture3DAttribute

java.lang.Object
gaiasky.render.gdx.shader.attribute.Attribute
gaiasky.render.gdx.shader.attribute.Texture3DAttribute
All Implemented Interfaces:
Comparable<Attribute>

public class Texture3DAttribute extends Attribute
  • Field Details

    • Volume0Alias

      public static final String Volume0Alias
      See Also:
    • Volume0

      public static final int Volume0
    • Volume1Alias

      public static final String Volume1Alias
      See Also:
    • Volume1

      public static final int Volume1
    • Volume2Alias

      public static final String Volume2Alias
      See Also:
    • Volume2

      public static final int Volume2
    • Volume3Alias

      public static final String Volume3Alias
      See Also:
    • Volume3

      public static final int Volume3
    • textureDescription

      public final com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<com.badlogic.gdx.graphics.Texture3D> textureDescription
    • offsetU

      public float offsetU
    • offsetV

      public float offsetV
    • offsetW

      public float offsetW
    • scaleU

      public float scaleU
    • scaleV

      public float scaleV
    • scaleW

      public float scaleW
    • volumeType

      public VolumeType volumeType
      Storage format of the texture at this slot, propagated from VolumeTexture.type(). It tells the shader what the sampled texel means: a density-only (R8) volume reads its density from .r, while a color+density (RGBA) volume reads colour from .rgb and density from .a. Defaults to VolumeType.DENSITY, so a slot populated without an explicit type keeps the legacy density-only behaviour.
    • depthThreshold

      public float depthThreshold
      Minimum density for this slot to be treated as an occluder in the depth-only pre-pass (RenderGroup.VOLUME_DEPTH). A sample of this volume contributes to the written depth only where its density exceeds this value.

      Zero (the default) or negative means the slot never occludes: it still renders, but nothing can be hidden behind it. That is the right default for a volume that only emits (gas): opacity is the job of the absorbing volume, and a faint emissive shell must not punch an opaque hole in the star field.

      The whole depth pass is skipped for a volume whose scene sets "writeDepth": false.

    • occupancyDescription

      public com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<com.badlogic.gdx.graphics.Texture3D> occupancyDescription
      The brick occupancy grid of the volume at this slot, if it has one: an R8 3D texture covering the same box, each texel the maximum density of the corresponding brick of voxels, built by VolumeTextureLoader.VolumeTextureParameter.occupancy. A zero texel means every sample in that brick would read a zero, so the shader's march jumps the whole brick.

      Null means the slot has no occupancy grid, and the shader is bound a 1x1x1 volume of ones instead - see VolumeTexture.occupancyDescriptor(TextureDescriptor). This is deliberately not part of hashCode() or compareTo(Attribute): it is derived from textureDescription, so two attributes with the same texture always have the same grid, and comparing it would only ever repeat the texture comparison.

  • Constructor Details

    • Texture3DAttribute

      public Texture3DAttribute(int index)
    • Texture3DAttribute

      public <T extends com.badlogic.gdx.graphics.Texture3D> Texture3DAttribute(int index, com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<T> textureDescription)
    • Texture3DAttribute

      public <T extends com.badlogic.gdx.graphics.Texture3D> Texture3DAttribute(int index, com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<T> textureDescription, float offsetU, float offsetV, float offsetW, float scaleU, float scaleV, float scaleW)
    • Texture3DAttribute

      public <T extends com.badlogic.gdx.graphics.Texture3D> Texture3DAttribute(int index, com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<T> textureDescription, float offsetU, float offsetV, float offsetW, float scaleU, float scaleV, float scaleW, VolumeType volumeType)
    • Texture3DAttribute

      public Texture3DAttribute(int index, com.badlogic.gdx.graphics.Texture3D texture)
    • Texture3DAttribute

      public Texture3DAttribute(int index, com.badlogic.gdx.graphics.Texture3D texture, VolumeType volumeType)
    • Texture3DAttribute

      public Texture3DAttribute(Texture3DAttribute copyFrom)
  • Method Details