#include <dynamicshadowsrender.h>
◆ ShadowRenderer()
ShadowRenderer::ShadowRenderer |
( |
IrrlichtDevice * | device, |
|
|
Client * | client ) |
References addDirectionalLight(), g_settings, Settings::getBool(), Settings::getFloat(), Settings::getS16(), Settings::getS32(), m_client, m_map_shadow_update_frames, m_shadow_map_colored, m_shadow_map_max_distance, m_shadow_map_texture_32bit, m_shadow_map_texture_size, m_shadow_samples, m_shadow_strength_gamma, m_shadows_enabled, and m_shadows_supported.
◆ ~ShadowRenderer()
ShadowRenderer::~ShadowRenderer |
( |
| ) |
|
◆ addDirectionalLight()
size_t ShadowRenderer::addDirectionalLight |
( |
| ) |
|
◆ addNodeToShadowList()
void ShadowRenderer::addNodeToShadowList |
( |
scene::ISceneNode * | node, |
|
|
E_SHADOW_MODE | shadowMode = ESM_BOTH ) |
◆ createShaders()
void ShadowRenderer::createShaders |
( |
| ) |
|
|
private |
References depth_shader, depth_shader_entities, depth_shader_trans, errorstream, shadowScreenQuad::getMaterial(), getShaderPath(), m_driver, m_screen_quad, m_shadow_depth_cb, m_shadow_depth_entity_cb, m_shadow_depth_trans_cb, m_shadow_map_colored, m_shadow_mix_cb, m_shadows_enabled, m_shadows_supported, mixcsm_shader, and readShaderFile().
Referenced by initialize().
◆ disable()
void ShadowRenderer::disable |
( |
| ) |
|
|
private |
◆ drawDebug()
void ShadowRenderer::drawDebug |
( |
| ) |
|
◆ enable()
void ShadowRenderer::enable |
( |
| ) |
|
|
inlineprivate |
◆ get_texture()
video::ITexture * ShadowRenderer::get_texture |
( |
| ) |
|
|
inline |
◆ getDirectionalLight()
◆ getDirectionalLightCount()
size_t ShadowRenderer::getDirectionalLightCount |
( |
| ) |
const |
◆ getMaxShadowFar()
f32 ShadowRenderer::getMaxShadowFar |
( |
| ) |
const |
◆ getPerspectiveBiasXY()
f32 ShadowRenderer::getPerspectiveBiasXY |
( |
| ) |
|
|
inline |
◆ getPerspectiveBiasZ()
f32 ShadowRenderer::getPerspectiveBiasZ |
( |
| ) |
|
|
inline |
◆ getShadowSamples()
s32 ShadowRenderer::getShadowSamples |
( |
| ) |
const |
|
inline |
◆ getShadowStrength()
float ShadowRenderer::getShadowStrength |
( |
| ) |
const |
|
inline |
◆ getShadowTint()
video::SColor ShadowRenderer::getShadowTint |
( |
| ) |
const |
|
inline |
◆ getSMTexture()
video::ITexture * ShadowRenderer::getSMTexture |
( |
const std::string & | shadow_map_name, |
|
|
video::ECOLOR_FORMAT | texture_format, |
|
|
bool | force_creation = false ) |
|
private |
◆ getTimeOfDay()
float ShadowRenderer::getTimeOfDay |
( |
| ) |
const |
|
inline |
◆ initialize()
void ShadowRenderer::initialize |
( |
| ) |
|
◆ is_active()
bool ShadowRenderer::is_active |
( |
| ) |
const |
|
inline |
◆ mixShadowsQuad()
void ShadowRenderer::mixShadowsQuad |
( |
| ) |
|
|
private |
◆ preInit()
◆ readShaderFile()
std::string ShadowRenderer::readShaderFile |
( |
const std::string & | path | ) |
|
|
private |
◆ removeNodeFromShadowList()
void ShadowRenderer::removeNodeFromShadowList |
( |
scene::ISceneNode * | node | ) |
|
◆ renderShadowMap()
void ShadowRenderer::renderShadowMap |
( |
video::ITexture * | target, |
|
|
DirectionalLight & | light, |
|
|
scene::E_SCENE_NODE_RENDER_PASS | pass = scene::ESNRP_SOLID ) |
|
private |
References depth_shader, depth_shader_trans, Client::getEnv(), DirectionalLight::getFutureProjectionMatrix(), DirectionalLight::getFutureViewMatrix(), ClientEnvironment::getMap(), m_client, m_current_frame, m_driver, m_force_update_shadow_map, m_map_shadow_update_frames, m_shadow_map_colored, and ClientMap::renderMapShadows().
Referenced by updateSMTextures().
◆ renderShadowObjects()
void ShadowRenderer::renderShadowObjects |
( |
video::ITexture * | target, |
|
|
DirectionalLight & | light ) |
|
private |
◆ setForceUpdateShadowMap()
void ShadowRenderer::setForceUpdateShadowMap |
( |
| ) |
|
|
inline |
◆ setShadowIntensity()
void ShadowRenderer::setShadowIntensity |
( |
float | shadow_intensity | ) |
|
◆ setShadowTint()
void ShadowRenderer::setShadowTint |
( |
video::SColor | shadow_tint | ) |
|
|
inline |
◆ setTimeOfDay()
void ShadowRenderer::setTimeOfDay |
( |
float | isDay | ) |
|
|
inline |
◆ update()
void ShadowRenderer::update |
( |
video::ITexture * | outputTarget = nullptr | ) |
|
References ShadowDepthShaderCB::CameraPos, shadowScreenQuad::getMaterial(), m_driver, m_light_list, m_screen_quad, m_shadow_depth_entity_cb, m_shadow_map_colored, m_shadow_node_array, m_shadows_enabled, m_smgr, shadowScreenQuad::render(), renderShadowObjects(), shadowMapClientMap, shadowMapTextureColors, shadowMapTextureDynamicObjects, shadowMapTextureFinal, and updateSMTextures().
Referenced by RenderShadowMapStep::run().
◆ updateSMTextures()
void ShadowRenderer::updateSMTextures |
( |
| ) |
|
|
private |
References BS, getPerspectiveBiasXY(), getPerspectiveBiasZ(), getSMTexture(), itos(), m_current_frame, m_driver, m_force_update_shadow_map, m_light_list, m_map_shadow_update_frames, m_shadow_depth_cb, m_shadow_depth_entity_cb, m_shadow_depth_trans_cb, m_shadow_map_colored, m_shadow_map_max_distance, m_shadow_map_texture_32bit, m_shadow_map_texture_size, m_shadow_node_array, m_shadows_enabled, m_smgr, m_texture_format, m_texture_format_color, renderShadowMap(), shadowMapClientMap, shadowMapClientMapFuture, shadowMapTextureColors, shadowMapTextureDynamicObjects, shadowMapTextureFinal, and TEXTURE_LAYER_SHADOW.
Referenced by update().
◆ depth_shader
s32 ShadowRenderer::depth_shader {-1} |
|
private |
◆ depth_shader_entities
s32 ShadowRenderer::depth_shader_entities {-1} |
|
private |
◆ depth_shader_trans
s32 ShadowRenderer::depth_shader_trans {-1} |
|
private |
◆ m_client
Client* ShadowRenderer::m_client {nullptr} |
|
private |
◆ m_current_frame
u8 ShadowRenderer::m_current_frame {0} |
|
private |
◆ m_driver
video::IVideoDriver* ShadowRenderer::m_driver {nullptr} |
|
private |
◆ m_force_update_shadow_map
bool ShadowRenderer::m_force_update_shadow_map |
|
private |
◆ m_light_list
◆ m_map_shadow_update_frames
u8 ShadowRenderer::m_map_shadow_update_frames |
|
private |
◆ m_perspective_bias_xy
f32 ShadowRenderer::m_perspective_bias_xy |
|
private |
◆ m_perspective_bias_z
f32 ShadowRenderer::m_perspective_bias_z |
|
private |
◆ m_screen_quad
◆ m_shadow_depth_cb
◆ m_shadow_depth_entity_cb
◆ m_shadow_depth_trans_cb
◆ m_shadow_map_colored
bool ShadowRenderer::m_shadow_map_colored |
|
private |
◆ m_shadow_map_max_distance
float ShadowRenderer::m_shadow_map_max_distance |
|
private |
◆ m_shadow_map_texture_32bit
bool ShadowRenderer::m_shadow_map_texture_32bit |
|
private |
◆ m_shadow_map_texture_size
float ShadowRenderer::m_shadow_map_texture_size |
|
private |
◆ m_shadow_mix_cb
◆ m_shadow_node_array
std::vector<NodeToApply> ShadowRenderer::m_shadow_node_array |
|
private |
◆ m_shadow_samples
int ShadowRenderer::m_shadow_samples |
|
private |
◆ m_shadow_strength
float ShadowRenderer::m_shadow_strength |
|
private |
◆ m_shadow_strength_gamma
float ShadowRenderer::m_shadow_strength_gamma |
|
private |
◆ m_shadow_tint
video::SColor ShadowRenderer::m_shadow_tint { 255, 0, 0, 0 } |
|
private |
◆ m_shadows_enabled
bool ShadowRenderer::m_shadows_enabled |
|
private |
◆ m_shadows_supported
bool ShadowRenderer::m_shadows_supported |
|
private |
◆ m_smgr
scene::ISceneManager* ShadowRenderer::m_smgr {nullptr} |
|
private |
◆ m_texture_format
video::ECOLOR_FORMAT ShadowRenderer::m_texture_format {video::ECOLOR_FORMAT::ECF_R16F} |
|
private |
◆ m_texture_format_color
video::ECOLOR_FORMAT ShadowRenderer::m_texture_format_color {video::ECOLOR_FORMAT::ECF_R16G16} |
|
private |
◆ m_time_day
float ShadowRenderer::m_time_day {0.0f} |
|
private |
◆ mixcsm_shader
s32 ShadowRenderer::mixcsm_shader {-1} |
|
private |
◆ shadowMapClientMap
video::ITexture* ShadowRenderer::shadowMapClientMap {nullptr} |
|
private |
◆ shadowMapClientMapFuture
video::ITexture* ShadowRenderer::shadowMapClientMapFuture {nullptr} |
|
private |
◆ shadowMapTextureColors
video::ITexture* ShadowRenderer::shadowMapTextureColors {nullptr} |
|
private |
◆ shadowMapTextureDynamicObjects
video::ITexture* ShadowRenderer::shadowMapTextureDynamicObjects {nullptr} |
|
private |
◆ shadowMapTextureFinal
video::ITexture* ShadowRenderer::shadowMapTextureFinal {nullptr} |
|
private |
◆ TEXTURE_LAYER_SHADOW
const int ShadowRenderer::TEXTURE_LAYER_SHADOW = 3 |
|
static |
The documentation for this class was generated from the following files: