Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrenderreflectionmap.cpp File Reference
#include <QtQuick3DRuntimeRender/private/qssgrenderreflectionprobe_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderlayer_p.h>
#include <QtQuick3DRuntimeRender/private/qssglayerrenderdata_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendercontextcore_p.h>
#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
+ Include dependency graph for qssgrenderreflectionmap.cpp:

Go to the source code of this file.

Functions

static QRhiTextureallocateRhiReflectionTexture (QRhi *rhi, QRhiTexture::Format format, const QSize &size, QRhiTexture::Flags flags={})
 
static QRhiRenderBufferallocateRhiReflectionRenderBuffer (QRhi *rhi, QRhiRenderBuffer::Type type, const QSize &size)
 
float radicalInverseVdC (uint bits)
 
QVector2D hammersley (uint i, uint N)
 
QVector3D importanceSampleGGX (QVector2D xi, float roughness)
 
float distributionGGX (float nDotH, float roughness)
 
void fillPrefilterValues (float roughness, float resolution, QVarLengthArray< QVector4D, prefilterSampleCount > &sampleDirections, float &invTotalWeight, uint &sampleCount)
 

Variables

QT_BEGIN_NAMESPACE const int prefilterSampleCount = 16
 
static const float cube []
 

Function Documentation

◆ allocateRhiReflectionRenderBuffer()

static QRhiRenderBuffer * allocateRhiReflectionRenderBuffer ( QRhi rhi,
QRhiRenderBuffer::Type  type,
const QSize size 
)
static

Definition at line 43 of file qssgrenderreflectionmap.cpp.

References QRhi::newRenderBuffer(), and qWarning.

Referenced by QSSGRenderReflectionMap::addReflectionMapEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allocateRhiReflectionTexture()

static QRhiTexture * allocateRhiReflectionTexture ( QRhi rhi,
QRhiTexture::Format  format,
const QSize size,
QRhiTexture::Flags  flags = {} 
)
static

Definition at line 32 of file qssgrenderreflectionmap.cpp.

Referenced by QSSGRenderReflectionMap::addReflectionMapEntry().

+ Here is the caller graph for this function:

◆ distributionGGX()

float distributionGGX ( float  nDotH,
float  roughness 
)

Definition at line 410 of file qssgrenderreflectionmap.cpp.

References a2, and M_PI.

Referenced by fillPrefilterValues().

+ Here is the caller graph for this function:

◆ fillPrefilterValues()

void fillPrefilterValues ( float  roughness,
float  resolution,
QVarLengthArray< QVector4D, prefilterSampleCount > &  sampleDirections,
float &  invTotalWeight,
uint sampleCount 
)

Definition at line 423 of file qssgrenderreflectionmap.cpp.

References QVarLengthArray< T, Prealloc >::append(), distributionGGX(), hammersley(), i, importanceSampleGGX(), log2(), M_PI, QVector3D::normalize(), prefilterSampleCount, and QVector3D::z().

Referenced by QSSGReflectionMapEntry::renderMips().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hammersley()

QVector2D hammersley ( uint  i,
uint  N 
)

Definition at line 393 of file qssgrenderreflectionmap.cpp.

References i, and radicalInverseVdC().

Referenced by fillPrefilterValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importanceSampleGGX()

QVector3D importanceSampleGGX ( QVector2D  xi,
float  roughness 
)

Definition at line 398 of file qssgrenderreflectionmap.cpp.

References M_PI, QVector2D::x(), and QVector2D::y().

Referenced by fillPrefilterValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radicalInverseVdC()

float radicalInverseVdC ( uint  bits)

Definition at line 383 of file qssgrenderreflectionmap.cpp.

Referenced by hammersley().

+ Here is the caller graph for this function:

Variable Documentation

◆ cube

const float cube[]
static

Definition at line 297 of file qssgrenderreflectionmap.cpp.

◆ prefilterSampleCount