9#include <IrrlichtDevice.h>
69 void update(video::ITexture *outputTarget =
nullptr);
93 video::ITexture *
getSMTexture(
const std::string &shadow_map_name,
94 video::ECOLOR_FORMAT texture_format,
95 bool force_creation =
false);
98 scene::E_SCENE_NODE_RENDER_PASS pass =
Definition dynamicshadows.h:29
Definition shadowsshadercallbacks.h:54
Definition dynamicshadowsrender.h:39
video::SColor getShadowTint() const
Definition dynamicshadowsrender.h:86
float m_time_day
Definition dynamicshadowsrender.h:125
int m_shadow_samples
Definition dynamicshadowsrender.h:126
video::IVideoDriver * m_driver
Definition dynamicshadowsrender.h:109
~ShadowRenderer()
Definition dynamicshadowsrender.cpp:50
s32 depth_shader_trans
Definition dynamicshadowsrender.h:147
s32 mixcsm_shader
Definition dynamicshadowsrender.h:148
u8 m_current_frame
Definition dynamicshadowsrender.h:133
void setTimeOfDay(float isDay)
Definition dynamicshadowsrender.h:80
void updateSMTextures()
Definition dynamicshadowsrender.cpp:202
void update(video::ITexture *outputTarget=nullptr)
Definition dynamicshadowsrender.cpp:339
video::ITexture * shadowMapTextureFinal
Definition dynamicshadowsrender.h:113
ShadowRenderer(IrrlichtDevice *device, Client *client)
Definition dynamicshadowsrender.cpp:22
bool m_shadow_map_texture_32bit
Definition dynamicshadowsrender.h:127
video::ITexture * shadowMapTextureColors
Definition dynamicshadowsrender.h:115
std::string readShaderFile(const std::string &path)
Definition dynamicshadowsrender.cpp:691
float getShadowStrength() const
Definition dynamicshadowsrender.h:85
bool m_shadows_supported
Definition dynamicshadowsrender.h:129
void renderShadowObjects(video::ITexture *target, DirectionalLight &light)
Definition dynamicshadowsrender.cpp:464
u8 m_map_shadow_update_frames
Definition dynamicshadowsrender.h:132
size_t getDirectionalLightCount() const
Definition dynamicshadowsrender.cpp:156
float m_shadow_strength_gamma
Definition dynamicshadowsrender.h:122
video::SColor m_shadow_tint
Definition dynamicshadowsrender.h:121
scene::ISceneManager * m_smgr
Definition dynamicshadowsrender.h:108
float getTimeOfDay() const
Definition dynamicshadowsrender.h:87
bool m_shadows_enabled
Definition dynamicshadowsrender.h:128
void removeNodeFromShadowList(scene::ISceneNode *node)
Definition dynamicshadowsrender.cpp:187
video::ECOLOR_FORMAT m_texture_format_color
Definition dynamicshadowsrender.h:138
f32 m_perspective_bias_z
Definition dynamicshadowsrender.h:135
float m_shadow_strength
Definition dynamicshadowsrender.h:120
f32 getPerspectiveBiasZ()
Definition dynamicshadowsrender.h:90
s32 getShadowSamples() const
Definition dynamicshadowsrender.h:84
static const int TEXTURE_LAYER_SHADOW
Definition dynamicshadowsrender.h:41
Client * m_client
Definition dynamicshadowsrender.h:110
shadowScreenQuadCB * m_shadow_mix_cb
Definition dynamicshadowsrender.h:155
video::ITexture * getSMTexture(const std::string &shadow_map_name, video::ECOLOR_FORMAT texture_format, bool force_creation=false)
Definition dynamicshadowsrender.cpp:417
video::ITexture * shadowMapTextureDynamicObjects
Definition dynamicshadowsrender.h:114
size_t addDirectionalLight()
Adds a directional light shadow map (Usually just one (the sun) except in Tattoine ).
Definition dynamicshadowsrender.cpp:143
video::ITexture * shadowMapClientMap
Definition dynamicshadowsrender.h:111
void setShadowIntensity(float shadow_intensity)
Definition dynamicshadowsrender.cpp:167
ShadowDepthShaderCB * m_shadow_depth_cb
Definition dynamicshadowsrender.h:150
bool is_active() const
Definition dynamicshadowsrender.h:79
void setShadowTint(video::SColor shadow_tint)
Definition dynamicshadowsrender.h:82
static void preInit(IWritableShaderSource *shsrc)
Definition dynamicshadowsrender.cpp:107
void drawDebug()
Definition dynamicshadowsrender.cpp:385
void mixShadowsQuad()
Definition dynamicshadowsrender.cpp:521
f32 getMaxShadowFar() const
Definition dynamicshadowsrender.cpp:161
bool m_shadow_map_colored
Definition dynamicshadowsrender.h:130
bool m_force_update_shadow_map
Definition dynamicshadowsrender.h:131
ShadowDepthShaderCB * m_shadow_depth_entity_cb
Definition dynamicshadowsrender.h:151
shadowScreenQuad * m_screen_quad
Definition dynamicshadowsrender.h:154
s32 depth_shader
Definition dynamicshadowsrender.h:145
void disable()
Definition dynamicshadowsrender.cpp:67
void enable()
Definition dynamicshadowsrender.h:105
void renderShadowMap(video::ITexture *target, DirectionalLight &light, scene::E_SCENE_NODE_RENDER_PASS pass=scene::ESNRP_SOLID)
Definition dynamicshadowsrender.cpp:430
void initialize()
Definition dynamicshadowsrender.cpp:115
f32 m_perspective_bias_xy
Definition dynamicshadowsrender.h:134
ShadowDepthShaderCB * m_shadow_depth_trans_cb
Definition dynamicshadowsrender.h:152
float m_shadow_map_max_distance
Definition dynamicshadowsrender.h:123
std::vector< DirectionalLight > m_light_list
Definition dynamicshadowsrender.h:117
void setForceUpdateShadowMap()
Definition dynamicshadowsrender.h:70
s32 depth_shader_entities
Definition dynamicshadowsrender.h:146
video::ITexture * get_texture()
Definition dynamicshadowsrender.h:73
float m_shadow_map_texture_size
Definition dynamicshadowsrender.h:124
video::ECOLOR_FORMAT m_texture_format
Definition dynamicshadowsrender.h:137
void createShaders()
Definition dynamicshadowsrender.cpp:533
f32 getPerspectiveBiasXY()
Definition dynamicshadowsrender.h:89
std::vector< NodeToApply > m_shadow_node_array
Definition dynamicshadowsrender.h:118
video::ITexture * shadowMapClientMapFuture
Definition dynamicshadowsrender.h:112
void addNodeToShadowList(scene::ISceneNode *node, E_SHADOW_MODE shadowMode=ESM_BOTH)
Adds a shadow to the scene node.
Definition dynamicshadowsrender.cpp:176
DirectionalLight & getDirectionalLight(u32 index=0)
Definition dynamicshadowsrender.cpp:151
Definition shadowsScreenQuad.h:25
Definition shadowsScreenQuad.h:12
ShadowRenderer * createShadowRenderer(IrrlichtDevice *device, Client *client)
Create a shadow renderer if settings allow this.
Definition dynamicshadowsrender.cpp:705
E_SHADOW_MODE
Definition dynamicshadowsrender.h:19
@ ESM_RECEIVE
Definition dynamicshadowsrender.h:20
@ ESM_BOTH
Definition dynamicshadowsrender.h:21
Definition activeobjectmgr.cpp:11
Definition dynamicshadowsrender.h:25
E_SHADOW_MODE shadowMode
Definition dynamicshadowsrender.h:34
bool dirty
Definition dynamicshadowsrender.h:35
bool operator<(const NodeToApply &other) const
Definition dynamicshadowsrender.h:30
NodeToApply(scene::ISceneNode *n, E_SHADOW_MODE m=E_SHADOW_MODE::ESM_BOTH)
Definition dynamicshadowsrender.h:26
scene::ISceneNode * node
Definition dynamicshadowsrender.h:32