Support Forum       G3D Web Page     
Classes | Public Member Functions | Public Attributes | List of all members
glsl::DDGIVolume_glsl Class Reference

Shader program. More...

Classes

struct  DDGIVolume
 

Public Member Functions

ivec3 baseGridCoord (in DDGIVolume ddgiVolume, Point3 X)
 
int baseProbeIndex (in DDGIVolume ddgiVolume, Point3 X)
 Returns the index of the probe at the floor along each dimension. More...
 
float distanceSquared (Point2 v0, Point2 v1)
 
Color3 gridCoordToColor (ivec3 gridCoord)
 Matches code in LightFieldModel::debugDraw() More...
 
Point3 gridCoordToPosition (in DDGIVolume L, ivec3 c)
 
Point3 gridCoordToPositionNoOffset (in DDGIVolume L, ivec3 c)
 
int gridCoordToProbeIndex (in DDGIVolume ddgiVolume, in Point3 probeCoords)
 
More...
 
int idot (ivec3 a, ivec3 b)
 GLSL's dot on ivec3 returns a float. More...
 
int nearestProbeIndex (in DDGIVolume L, Point3 X, out Point3 probeCoords)
 probeCoords Coordinates of the probe, computed as part of the process. More...
 
Color3 probeIndexToColor (in DDGIVolume L, int index)
 
ivec3 probeIndexToGridCoord (in DDGIVolume L, int index)
 
Point3 probeLocation (in DDGIVolume L, int index)
 
Point2 probeTextureCoordFromDirection (Vector3 dir, ivec3 probeGridCoord, const in bool useIrradiance, DDGIVolume ddgiVolume)
 
Vector4 readProbeOffset (in DDGIVolume L, ivec2 texelCoord)
 
int relativeProbeIndex (in DDGIVolume ddgiVolume, int baseProbeIndex, int relativeIndex)
 
Color4 sampleOneDDGIVolume (DDGIVolume ddgiVolume, Point3 wsPosition, Vector3 offsetPos, Vector3 sampleDirection, Point3 cameraPos, bool skippable)
 Result.rgb = Irradiance3 Result.a = weight based on wsPosition vs. More...
 
void writeProbeOffset (in DDGIVolume L, in ivec2 texelCoord, in vec4 offsetAndFlags)
 

Public Attributes

const float highestSignedValue = float(1 << ( - 1))
 

Detailed Description

Shader program.

Member Function Documentation

◆ baseGridCoord()

ivec3 glsl::DDGIVolume_glsl::baseGridCoord ( in DDGIVolume  ddgiVolume,
Point3  X 
)
inline

◆ baseProbeIndex()

int glsl::DDGIVolume_glsl::baseProbeIndex ( in DDGIVolume  ddgiVolume,
Point3  X 
)
inline

Returns the index of the probe at the floor along each dimension.

◆ distanceSquared()

float glsl::DDGIVolume_glsl::distanceSquared ( Point2  v0,
Point2  v1 
)
inline

◆ gridCoordToColor()

Color3 glsl::DDGIVolume_glsl::gridCoordToColor ( ivec3  gridCoord)
inline

◆ gridCoordToPosition()

Point3 glsl::DDGIVolume_glsl::gridCoordToPosition ( in DDGIVolume  L,
ivec3  c 
)
inline

◆ gridCoordToPositionNoOffset()

Point3 glsl::DDGIVolume_glsl::gridCoordToPositionNoOffset ( in DDGIVolume  L,
ivec3  c 
)
inline

◆ gridCoordToProbeIndex()

int glsl::DDGIVolume_glsl::gridCoordToProbeIndex ( in DDGIVolume  ddgiVolume,
in Point3  probeCoords 
)
inline


Parameters
probeCoordsInteger (stored in float) coordinates of the probe on the probe grid

◆ idot()

int glsl::DDGIVolume_glsl::idot ( ivec3  a,
ivec3  b 
)
inline

GLSL's dot on ivec3 returns a float.

This is an all-integer version

◆ nearestProbeIndex()

int glsl::DDGIVolume_glsl::nearestProbeIndex ( in DDGIVolume  L,
Point3  X,
out Point3  probeCoords 
)
inline

probeCoords Coordinates of the probe, computed as part of the process.

◆ probeIndexToColor()

Color3 glsl::DDGIVolume_glsl::probeIndexToColor ( in DDGIVolume  L,
int  index 
)
inline

◆ probeIndexToGridCoord()

ivec3 glsl::DDGIVolume_glsl::probeIndexToGridCoord ( in DDGIVolume  L,
int  index 
)
inline

◆ probeLocation()

Point3 glsl::DDGIVolume_glsl::probeLocation ( in DDGIVolume  L,
int  index 
)
inline

◆ probeTextureCoordFromDirection()

Point2 glsl::DDGIVolume_glsl::probeTextureCoordFromDirection ( Vector3  dir,
ivec3  probeGridCoord,
const in bool  useIrradiance,
DDGIVolume  ddgiVolume 
)
inline

◆ readProbeOffset()

Vector4 glsl::DDGIVolume_glsl::readProbeOffset ( in DDGIVolume  L,
ivec2  texelCoord 
)
inline

◆ relativeProbeIndex()

int glsl::DDGIVolume_glsl::relativeProbeIndex ( in DDGIVolume  ddgiVolume,
int  baseProbeIndex,
int  relativeIndex 
)
inline
Parameters
baseProbeIndexIndex into L.radianceProbeGrid's TEXTURE_2D_ARRAY. This is the probe at the floor of the current ray sampling position.
relativeIndexon [0, 7]. This is used as a set of three 1-bit offsets

Returns a probe index into L.radianceProbeGrid. It may be the same index as baseProbeIndex.

This will wrap in crazy ways when the camera is outside of the bounding box of the probes...but that's ok. If that case arises, then the trace is likely to be poor quality anyway. Regardless, this function will still return the index of some valid probe, and that probe can either be used or fail because it does not have visibility to the location desired.

See also
nextCycleIndex, baseProbeIndex

◆ sampleOneDDGIVolume()

Color4 glsl::DDGIVolume_glsl::sampleOneDDGIVolume ( DDGIVolume  ddgiVolume,
Point3  wsPosition,
Vector3  offsetPos,
Vector3  sampleDirection,
Point3  cameraPos,
bool  skippable 
)
inline

Result.rgb = Irradiance3 Result.a = weight based on wsPosition vs.

probe bounds

◆ writeProbeOffset()

void glsl::DDGIVolume_glsl::writeProbeOffset ( in DDGIVolume  L,
in ivec2  texelCoord,
in vec4  offsetAndFlags 
)
inline

Member Data Documentation

◆ highestSignedValue

const float glsl::DDGIVolume_glsl::highestSignedValue = float(1 << ( - 1))

documentation generated on Wed Nov 24 2021 08:02:03 using doxygen 1.8.15