Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgrenderreflectionmap.cpp File Reference

(cbd5326940410eefc68f7223e7dc33fb1a32c84a)

#include <QtQuick3DRuntimeRender/private/qssgrenderreflectionprobe_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderlayer_p.h>
#include <QtQuick3DRuntimeRender/private/qssglayerrenderdata_p.h>
#include "qssgrendercontextcore.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 42 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 31 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 409 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 422 of file qssgrenderreflectionmap.cpp.

References 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 392 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 397 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 382 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 296 of file qssgrenderreflectionmap.cpp.

◆ prefilterSampleCount