载入中...
搜索中...
未找到
eve::graphics::GlobalIllumination类 参考

Screen-space single-bounce GI (SSGI). @lifetime All texture arguments are borrowed for the duration of each call. 更多...

#include <GlobalIllumination.h>

Public 成员函数

 GlobalIllumination (Graphics *gfx)
 Global illumination.
 
 ~GlobalIllumination ()
 Global illumination.
 
 GlobalIllumination (const GlobalIllumination &)=delete
 
GlobalIllumination & operator= (const GlobalIllumination &)=delete
 
void setQuality (const std::string &quality)
 "low" | "medium" | "high" | "ultra" (unknown becomes medium).
 
std::string getQuality () const
 Returns the quality.
 
void setCamera (float eyeX, float eyeY, float eyeZ, float targetX, float targetY, float targetZ, float upX, float upY, float upZ, float fovYDeg, float aspect, float nearZ, float farZ)
 Camera for depth reconstruction (RH + ZO). Builds inv(viewProj) and near/far used by applyFromDepth.
 
void setInvViewProj (const glm::mat4 &invViewProj)
 Sets the inv view proj.
 
void setWorldNormalTexture (Texture *worldNormal)
 Set the GBuffer world-normal texture used for guided GI sampling.
 
void setAlbedoTexture (Texture *albedo)
 Set receiver albedo used for energy-conserving diffuse GI response.
 
void setTemporalMotionTexture (Texture *motionDepth)
 Set packed linear-depth and motion texture used by temporal GI resolve.
 
void setDepthPyramid (Texture *atlas, int levels)
 Set the shared horizontally packed RG min/max depth hierarchy.
 
void invalidateHistory ()
 Discard temporal GI history after a render-chain discontinuity.
 
void setRadius (float radius)
 Sets the radius.
 
void setIntensity (float intensity)
 Sets the intensity.
 
void setThickness (float thickness)
 Set world-space hit thickness used to reject screen-space GI leaks.
 
void setResolutionScale (float scale)
 Set internal GI resolution scale in the range 0.25 to 1.0.
 
void setLightDirection (float dx, float dy, float dz)
 Sets the light direction.
 
void setLightColor (float r, float g, float b)
 Sets the light color.
 
float getRadius () const
 Returns the radius.
 
float getIntensity () const
 Returns the intensity.
 
float getThickness () const
 Return world-space GI hit thickness.
 
float getResolutionScale () const
 Returns the resolution scale.
 
bool hasParam (const std::string &name) const
 True when param.
 
void setFloat (const std::string &name, float value)
 Sets the float.
 
float getFloat (const std::string &name) const
 Returns the float.
 
int getSampleCount () const
 Returns the sample count.
 
int getSpatialPassCount () const
 Number of explicit A-trous prefilter passes for the active quality.
 
void applyFromDepth (Graphics *gfx, Texture *packedAlbedo)
 Overlay bounced light onto the currently bound canvas / screen. Packed path (tests): RGB=albedo/lit, A=linear depth 0..1. 3D path: applyFromScene(color, hwDepth) with D32 NDC z.
 
void applyFromDepthTo (Graphics *gfx, Texture *packedAlbedo, Canvas *dest)
 Applies from depth to.
 
void applyFromSceneTo (Graphics *gfx, Texture *color, Texture *hwDepth, Canvas *dest)
 Applies from scene to.
 
void applyFromSceneTo (Graphics *gfx, Texture *color, Texture *hwDepth)
 Applies from scene to.
 
Canvas * getWorkingCanvas ()
 Returns the working canvas.
 
Texture * getWorkingTexture ()
 Temporally resolved GI texture, or the raw working texture before history exists. @lifetime Returned texture is borrowed from this effect until its targets are recreated.
 
void applyFromScene (Graphics *gfx, Texture *color, Texture *hwDepth)
 Applies from scene.
 
Shader * getShader () const
 Returns the shader.
 

详细描述

Screen-space single-bounce GI (SSGI). @lifetime All texture arguments are borrowed for the duration of each call.

Samples scene color (RGB = lit radiance) plus hardware D32 depth, and adds bounced light from nearby occluders. It can be used as a manual fullscreen overlay (applyFromScene / applyFromDepth), and RenderSystem3D runs it automatically when rtgi or reflectionChain is enabled. Tests may also pass a packed RGBA8 texture (RGB = albedo, A = linear depth) through applyFromDepth.

Quality presets ("low" | "medium" | "high") tune sample count and radius.

在文件 GlobalIllumination.h 第 30 行定义.

构造及析构函数说明

◆ GlobalIllumination() [1/2]

eve::graphics::GlobalIllumination::GlobalIllumination ( Graphics *  gfx)
explicit

Global illumination.

在文件 GlobalIllumination.cpp 第 91 行定义.

◆ ~GlobalIllumination()

eve::graphics::GlobalIllumination::~GlobalIllumination ( )
default

Global illumination.

◆ GlobalIllumination() [2/2]

eve::graphics::GlobalIllumination::GlobalIllumination ( const GlobalIllumination &  )
delete

成员函数说明

◆ applyFromDepth()

void eve::graphics::GlobalIllumination::applyFromDepth ( Graphics *  gfx,
Texture *  packedAlbedo 
)

Overlay bounced light onto the currently bound canvas / screen. Packed path (tests): RGB=albedo/lit, A=linear depth 0..1. 3D path: applyFromScene(color, hwDepth) with D32 NDC z.

在文件 GlobalIllumination.cpp 第 315 行定义.

引用了 eve::graphics::Texture::getHeight(), eve::graphics::Texture::getWidth() , 以及 eve::graphics::Shader::sendFloat().

被这些函数引用 applyFromDepthTo().

◆ applyFromDepthTo()

void eve::graphics::GlobalIllumination::applyFromDepthTo ( Graphics *  gfx,
Texture *  packedAlbedo,
Canvas *  dest 
)

◆ applyFromScene()

void eve::graphics::GlobalIllumination::applyFromScene ( Graphics *  gfx,
Texture *  color,
Texture *  hwDepth 
)

Applies from scene.

在文件 GlobalIllumination.cpp 第 323 行定义.

引用了 color , 以及 eve::graphics::Shader::sendFloat().

被这些函数引用 applyFromSceneTo().

◆ applyFromSceneTo() [1/2]

void eve::graphics::GlobalIllumination::applyFromSceneTo ( Graphics *  gfx,
Texture *  color,
Texture *  hwDepth 
)

Applies from scene to.

在文件 GlobalIllumination.cpp 第 424 行定义.

引用了 applyFromSceneTo() , 以及 color.

◆ applyFromSceneTo() [2/2]

void eve::graphics::GlobalIllumination::applyFromSceneTo ( Graphics *  gfx,
Texture *  color,
Texture *  hwDepth,
Canvas *  dest 
)

◆ getFloat()

float eve::graphics::GlobalIllumination::getFloat ( const std::string &  name) const

Returns the float.

在文件 GlobalIllumination.cpp 第 248 行定义.

引用了 eve::graphics::Shader::getFromVar(), eve::graphics::Shader::hasUniform(), name , 以及 v.

被这些函数引用 getSampleCount().

◆ getIntensity()

float eve::graphics::GlobalIllumination::getIntensity ( ) const
inline

Returns the intensity.

在文件 GlobalIllumination.h 第 85 行定义.

◆ getQuality()

std::string eve::graphics::GlobalIllumination::getQuality ( ) const
inline

Returns the quality.

在文件 GlobalIllumination.h 第 43 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ getRadius()

float eve::graphics::GlobalIllumination::getRadius ( ) const
inline

Returns the radius.

在文件 GlobalIllumination.h 第 83 行定义.

◆ getResolutionScale()

float eve::graphics::GlobalIllumination::getResolutionScale ( ) const
inline

Returns the resolution scale.

在文件 GlobalIllumination.h 第 89 行定义.

◆ getSampleCount()

int eve::graphics::GlobalIllumination::getSampleCount ( ) const

Returns the sample count.

在文件 GlobalIllumination.cpp 第 257 行定义.

引用了 getFloat().

◆ getShader()

Shader * eve::graphics::GlobalIllumination::getShader ( ) const
inline

Returns the shader.

@lifetime Returned shader is borrowed and owned by Graphics.

在文件 GlobalIllumination.h 第 130 行定义.

◆ getSpatialPassCount()

int eve::graphics::GlobalIllumination::getSpatialPassCount ( ) const
inline

Number of explicit A-trous prefilter passes for the active quality.

在文件 GlobalIllumination.h 第 101 行定义.

◆ getThickness()

float eve::graphics::GlobalIllumination::getThickness ( ) const
inline

Return world-space GI hit thickness.

在文件 GlobalIllumination.h 第 87 行定义.

◆ getWorkingCanvas()

Canvas * eve::graphics::GlobalIllumination::getWorkingCanvas ( )

Returns the working canvas.

@lifetime Returned canvas is borrowed from this effect until its targets are recreated.

在文件 GlobalIllumination.cpp 第 342 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ getWorkingTexture()

Texture * eve::graphics::GlobalIllumination::getWorkingTexture ( )

Temporally resolved GI texture, or the raw working texture before history exists. @lifetime Returned texture is borrowed from this effect until its targets are recreated.

在文件 GlobalIllumination.cpp 第 346 行定义.

引用了 eve::graphics::Canvas::getTexture().

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ hasParam()

bool eve::graphics::GlobalIllumination::hasParam ( const std::string &  name) const

True when param.

在文件 GlobalIllumination.cpp 第 229 行定义.

引用了 eve::graphics::Shader::hasUniform() , 以及 name.

◆ invalidateHistory()

void eve::graphics::GlobalIllumination::invalidateHistory ( )
inline

Discard temporal GI history after a render-chain discontinuity.

在文件 GlobalIllumination.h 第 67 行定义.

◆ operator=()

GlobalIllumination & eve::graphics::GlobalIllumination::operator= ( const GlobalIllumination &  )
delete

◆ setAlbedoTexture()

void eve::graphics::GlobalIllumination::setAlbedoTexture ( Texture *  albedo)
inline

Set receiver albedo used for energy-conserving diffuse GI response.

在文件 GlobalIllumination.h 第 58 行定义.

引用了 albedo.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setCamera()

void eve::graphics::GlobalIllumination::setCamera ( float  eyeX,
float  eyeY,
float  eyeZ,
float  targetX,
float  targetY,
float  targetZ,
float  upX,
float  upY,
float  upZ,
float  fovYDeg,
float  aspect,
float  nearZ,
float  farZ 
)

Camera for depth reconstruction (RH + ZO). Builds inv(viewProj) and near/far used by applyFromDepth.

在文件 GlobalIllumination.cpp 第 156 行定义.

引用了 eye, fovRad, eve::graphics::perspectiveVulkanRH_ZO(), proj, eve::graphics::Shader::sendFloat(), setInvViewProj(), targetX , 以及 view.

◆ setDepthPyramid()

void eve::graphics::GlobalIllumination::setDepthPyramid ( Texture *  atlas,
int  levels 
)
inline

Set the shared horizontally packed RG min/max depth hierarchy.

在文件 GlobalIllumination.h 第 62 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setFloat()

void eve::graphics::GlobalIllumination::setFloat ( const std::string &  name,
float  value 
)

Sets the float.

在文件 GlobalIllumination.cpp 第 233 行定义.

引用了 eve::graphics::Shader::hasUniform(), name, eve::graphics::Shader::sendFloat(), setThickness() , 以及 value.

被这些函数引用 setIntensity() , 以及 setRadius().

◆ setIntensity()

void eve::graphics::GlobalIllumination::setIntensity ( float  intensity)

Sets the intensity.

在文件 GlobalIllumination.cpp 第 192 行定义.

引用了 setFloat().

◆ setInvViewProj()

void eve::graphics::GlobalIllumination::setInvViewProj ( const glm::mat4 &  invViewProj)

Sets the inv view proj.

在文件 GlobalIllumination.cpp 第 142 行定义.

引用了 c, invViewProj, r , 以及 eve::graphics::Shader::sendMatrix().

被这些函数引用 setCamera().

◆ setLightColor()

void eve::graphics::GlobalIllumination::setLightColor ( float  r,
float  g,
float  b 
)

Sets the light color.

在文件 GlobalIllumination.cpp 第 221 行定义.

引用了 b, g, r , 以及 eve::graphics::Shader::sendFloat().

◆ setLightDirection()

void eve::graphics::GlobalIllumination::setLightDirection ( float  dx,
float  dy,
float  dz 
)

Sets the light direction.

在文件 GlobalIllumination.cpp 第 210 行定义.

引用了 d, dx, dy, dz , 以及 eve::graphics::Shader::sendFloat().

◆ setQuality()

void eve::graphics::GlobalIllumination::setQuality ( const std::string &  quality)

"low" | "medium" | "high" | "ultra" (unknown becomes medium).

在文件 GlobalIllumination.cpp 第 133 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setRadius()

void eve::graphics::GlobalIllumination::setRadius ( float  radius)

Sets the radius.

在文件 GlobalIllumination.cpp 第 187 行定义.

引用了 radius , 以及 setFloat().

◆ setResolutionScale()

void eve::graphics::GlobalIllumination::setResolutionScale ( float  scale)

Set internal GI resolution scale in the range 0.25 to 1.0.

在文件 GlobalIllumination.cpp 第 202 行定义.

引用了 scale.

◆ setTemporalMotionTexture()

void eve::graphics::GlobalIllumination::setTemporalMotionTexture ( Texture *  motionDepth)
inline

Set packed linear-depth and motion texture used by temporal GI resolve.

在文件 GlobalIllumination.h 第 60 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().

◆ setThickness()

void eve::graphics::GlobalIllumination::setThickness ( float  thickness)

Set world-space hit thickness used to reject screen-space GI leaks.

在文件 GlobalIllumination.cpp 第 197 行定义.

引用了 thickness.

被这些函数引用 setFloat().

◆ setWorldNormalTexture()

void eve::graphics::GlobalIllumination::setWorldNormalTexture ( Texture *  worldNormal)
inline

Set the GBuffer world-normal texture used for guided GI sampling.

在文件 GlobalIllumination.h 第 56 行定义.

被这些函数引用 eve::graphics::RenderSystem3D::render().


该类的文档由以下文件生成: