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

Screen-space single-bounce GI (SSGI). 更多...

#include <GlobalIllumination.h>

Public 成员函数

 GlobalIllumination (Graphics *gfx)
 
 ~GlobalIllumination ()
 
 GlobalIllumination (const GlobalIllumination &)=delete
 
GlobalIlluminationoperator= (const GlobalIllumination &)=delete
 
void setQuality (const std::string &quality)
 "low" | "medium" | "high" (unknown → medium).
 
std::string getQuality () const
 
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)
 
void setRadius (float radius)
 
void setIntensity (float intensity)
 
void setLightDirection (float dx, float dy, float dz)
 
void setLightColor (float r, float g, float b)
 
float getRadius () const
 
float getIntensity () const
 
bool hasParam (const std::string &name) const
 
void setFloat (const std::string &name, float value)
 
float getFloat (const std::string &name) const
 
int getSampleCount () const
 
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)
 
void applyFromScene (Graphics *gfx, Texture *color, Texture *hwDepth)
 
ShadergetShader () const
 

详细描述

Screen-space single-bounce GI (SSGI).

Samples scene color (RGB = lit radiance) plus hardware D32 depth, and adds bounced light from nearby occluders. Manual fullscreen overlay (applyFromScene / applyFromDepth). The 3D default path does not auto-apply it: sampling lit scene color reprints nearby props onto the floor as swimming ghosts. Mesh shaders still add hemispheric sky/ground

  • wrap fill. Tests may still pass a packed RGBA8 (RGB = albedo, A = linear depth) via applyFromDepth.

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

在文件 GlobalIllumination.h27 行定义.

构造及析构函数说明

◆ GlobalIllumination() [1/2]

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

在文件 GlobalIllumination.cpp62 行定义.

◆ ~GlobalIllumination()

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

◆ 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.cpp197 行定义.

引用了 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 
)

在文件 GlobalIllumination.cpp204 行定义.

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

◆ getFloat()

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

在文件 GlobalIllumination.cpp152 行定义.

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

被这些函数引用 getSampleCount().

◆ getIntensity()

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

在文件 GlobalIllumination.h55 行定义.

◆ getQuality()

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

在文件 GlobalIllumination.h37 行定义.

◆ getRadius()

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

在文件 GlobalIllumination.h54 行定义.

◆ getSampleCount()

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

在文件 GlobalIllumination.cpp160 行定义.

引用了 getFloat().

◆ getShader()

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

在文件 GlobalIllumination.h72 行定义.

◆ hasParam()

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

在文件 GlobalIllumination.cpp140 行定义.

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

◆ operator=()

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

◆ 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.cpp97 行定义.

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

◆ setFloat()

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

在文件 GlobalIllumination.cpp144 行定义.

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

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

◆ setIntensity()

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

在文件 GlobalIllumination.cpp118 行定义.

引用了 setFloat().

◆ setInvViewProj()

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

在文件 GlobalIllumination.cpp92 行定义.

引用了 eve::graphics::Shader::sendMatrix().

被这些函数引用 setCamera().

◆ setLightColor()

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

在文件 GlobalIllumination.cpp133 行定义.

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

◆ setLightDirection()

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

在文件 GlobalIllumination.cpp123 行定义.

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

◆ setQuality()

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

"low" | "medium" | "high" (unknown → medium).

在文件 GlobalIllumination.cpp84 行定义.

◆ setRadius()

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

在文件 GlobalIllumination.cpp113 行定义.

引用了 setFloat().


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