Class Texture3DAttribute
- All Implemented Interfaces:
Comparable<Attribute>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatMinimum density for this slot to be treated as an occluder in the depth-only pre-pass (RenderGroup.VOLUME_DEPTH).com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<com.badlogic.gdx.graphics.Texture3D> 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 byVolumeTextureLoader.VolumeTextureParameter.occupancy.floatfloatfloatfloatfloatfloatfinal com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<com.badlogic.gdx.graphics.Texture3D> static final intstatic final Stringstatic final intstatic final Stringstatic final intstatic final Stringstatic final intstatic final StringStorage format of the texture at this slot, propagated fromVolumeTexture.type(). -
Constructor Summary
ConstructorsModifierConstructorDescriptionTexture3DAttribute(int index) <T extends com.badlogic.gdx.graphics.Texture3D>Texture3DAttribute(int index, com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor<T> textureDescription) <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) <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(int index, com.badlogic.gdx.graphics.Texture3D texture) Texture3DAttribute(int index, com.badlogic.gdx.graphics.Texture3D texture, VolumeType volumeType) Texture3DAttribute(Texture3DAttribute copyFrom) -
Method Summary
Methods inherited from class Attribute
equals, equals, getAttributeAlias, getAttributeIndex, getAttributeIndex, getAttributeType, getIndex, getNumAttributes, getTypes, has, register, toStringModifier and TypeMethodDescriptionprotected booleanbooleanstatic StringgetAttributeAlias(Bits type) static intgetAttributeIndex(Bits type) static intgetAttributeIndex(String alias) static BitsgetAttributeType(String alias) protected static intgetIndex(long oldType) static intstatic com.badlogic.gdx.utils.Array<String> getTypes()booleanhas(int index) protected static intCall this method to register a custom attribute type, see the wiki for an example.toString()
-
Field Details
-
Volume0Alias
- See Also:
-
Volume0
public static final int Volume0 -
Volume1Alias
- See Also:
-
Volume1
public static final int Volume1 -
Volume2Alias
- See Also:
-
Volume2
public static final int Volume2 -
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
Storage format of the texture at this slot, propagated fromVolumeTexture.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.rgband density from.a. Defaults toVolumeType.DENSITY, so a slot populated without an explicit type keeps the legacy density-only behaviour. -
depthThreshold
public float depthThresholdMinimum 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> occupancyDescriptionThe 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 byVolumeTextureLoader.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 ofhashCode()orcompareTo(Attribute): it is derived fromtextureDescription, 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
-
-
Method Details
-
copy
-
hashCode
-
compareTo
-