Luanti 5.16.0-dev
Loading...
Searching...
No Matches
GameGlobalShaderUniformSetter Class Reference
Inheritance diagram for GameGlobalShaderUniformSetter:
Collaboration diagram for GameGlobalShaderUniformSetter:

Public Member Functions

void onSettingsChange (const std::string &name)
void setSky (Sky *sky)
 GameGlobalShaderUniformSetter (Sky *sky, Game *game)
 ~GameGlobalShaderUniformSetter ()
void onSetUniforms (video::IMaterialRendererServices *services) override
 Called when uniforms need to be updated.
void onSetMaterial (const video::SMaterial &material) override
Public Member Functions inherited from IShaderUniformSetter
virtual ~IShaderUniformSetter ()=default

Static Public Member Functions

static void settingsCallback (const std::string &name, void *userdata)

Private Attributes

Skym_sky
Clientm_client
CachedVertexShaderSetting< float > m_animation_timer_vertex {"animationTimer"}
CachedPixelShaderSetting< float > m_animation_timer_pixel {"animationTimer"}
CachedVertexShaderSetting< float > m_animation_timer_delta_vertex {"animationTimerDelta"}
CachedPixelShaderSetting< float > m_animation_timer_delta_pixel {"animationTimerDelta"}
int m_crack_animation_length_i
CachedPixelShaderSetting< float > m_crack_animation_length {"crackAnimationLength"}
int m_crack_level_i = -1
CachedPixelShaderSetting< float > m_crack_level {"crackLevel"}
int m_crack_texture_scale_i = 0
CachedPixelShaderSetting< float > m_crack_texture_scale {"crackTextureScale"}
CachedPixelShaderSetting< float, 3 > m_day_light {"dayLight"}
CachedPixelShaderSetting< float, 3 > m_minimap_yaw {"yawVec"}
CachedPixelShaderSetting< float, 3 > m_camera_offset_pixel {"cameraOffset"}
CachedVertexShaderSetting< float, 3 > m_camera_offset_vertex {"cameraOffset"}
CachedPixelShaderSetting< float, 3 > m_camera_position_pixel {"cameraPosition"}
CachedVertexShaderSetting< float, 3 > m_camera_position_vertex {"cameraPosition"}
CachedVertexShaderSetting< float, 2 > m_texel_size0_vertex {"texelSize0"}
CachedPixelShaderSetting< float, 2 > m_texel_size0_pixel {"texelSize0"}
v2f m_texel_size0
CachedStructPixelShaderSetting< float, 7 > m_exposure_params_pixel
float m_user_exposure_compensation
bool m_bloom_enabled
CachedPixelShaderSetting< float > m_bloom_intensity_pixel {"bloomIntensity"}
CachedPixelShaderSetting< float > m_bloom_strength_pixel {"bloomStrength"}
CachedPixelShaderSetting< float > m_bloom_radius_pixel {"bloomRadius"}
CachedPixelShaderSetting< float > m_saturation_pixel {"saturation"}
bool m_volumetric_light_enabled
CachedPixelShaderSetting< float, 3 > m_sun_position_pixel {"sunPositionScreen"}
CachedPixelShaderSetting< float > m_sun_brightness_pixel {"sunBrightness"}
CachedPixelShaderSetting< float, 3 > m_moon_position_pixel {"moonPositionScreen"}
CachedPixelShaderSetting< float > m_moon_brightness_pixel {"moonBrightness"}
CachedPixelShaderSetting< float > m_volumetric_light_strength_pixel {"volumetricLightStrength"}

Static Private Attributes

static constexpr std::array< const char *, 1 > SETTING_CALLBACKS

Constructor & Destructor Documentation

◆ GameGlobalShaderUniformSetter()

GameGlobalShaderUniformSetter::GameGlobalShaderUniformSetter ( Sky * sky,
Game * game )
inline

References Game::crack_animation_length, g_settings, m_bloom_enabled, m_client, m_crack_animation_length_i, m_sky, m_user_exposure_compensation, m_volumetric_light_enabled, SETTING_CALLBACKS, and settingsCallback().

Referenced by settingsCallback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~GameGlobalShaderUniformSetter()

GameGlobalShaderUniformSetter::~GameGlobalShaderUniformSetter ( )
inline

References g_settings.

Member Function Documentation

◆ onSetMaterial()

void GameGlobalShaderUniformSetter::onSetMaterial ( const video::SMaterial & material)
inlineoverridevirtual

Reimplemented from IShaderUniformSetter.

References m_crack_level_i, m_crack_texture_scale_i, m_texel_size0, and MapBlockMesh::unpackCrackMaterialParam().

Here is the call graph for this function:

◆ onSettingsChange()

void GameGlobalShaderUniformSetter::onSettingsChange ( const std::string & name)
inline

References g_settings, and m_user_exposure_compensation.

Referenced by settingsCallback().

Here is the caller graph for this function:

◆ onSetUniforms()

◆ setSky()

void GameGlobalShaderUniformSetter::setSky ( Sky * sky)
inline

References m_sky.

◆ settingsCallback()

void GameGlobalShaderUniformSetter::settingsCallback ( const std::string & name,
void * userdata )
inlinestatic

References GameGlobalShaderUniformSetter(), and onSettingsChange().

Referenced by GameGlobalShaderUniformSetter().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_animation_timer_delta_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_animation_timer_delta_pixel {"animationTimerDelta"}
private

Referenced by onSetUniforms().

◆ m_animation_timer_delta_vertex

CachedVertexShaderSetting<float> GameGlobalShaderUniformSetter::m_animation_timer_delta_vertex {"animationTimerDelta"}
private

Referenced by onSetUniforms().

◆ m_animation_timer_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_animation_timer_pixel {"animationTimer"}
private

Referenced by onSetUniforms().

◆ m_animation_timer_vertex

CachedVertexShaderSetting<float> GameGlobalShaderUniformSetter::m_animation_timer_vertex {"animationTimer"}
private

Referenced by onSetUniforms().

◆ m_bloom_enabled

bool GameGlobalShaderUniformSetter::m_bloom_enabled
private

◆ m_bloom_intensity_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_bloom_intensity_pixel {"bloomIntensity"}
private

Referenced by onSetUniforms().

◆ m_bloom_radius_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_bloom_radius_pixel {"bloomRadius"}
private

Referenced by onSetUniforms().

◆ m_bloom_strength_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_bloom_strength_pixel {"bloomStrength"}
private

Referenced by onSetUniforms().

◆ m_camera_offset_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_camera_offset_pixel {"cameraOffset"}
private

Referenced by onSetUniforms().

◆ m_camera_offset_vertex

CachedVertexShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_camera_offset_vertex {"cameraOffset"}
private

Referenced by onSetUniforms().

◆ m_camera_position_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_camera_position_pixel {"cameraPosition"}
private

Referenced by onSetUniforms().

◆ m_camera_position_vertex

CachedVertexShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_camera_position_vertex {"cameraPosition"}
private

◆ m_client

Client* GameGlobalShaderUniformSetter::m_client
private

◆ m_crack_animation_length

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_crack_animation_length {"crackAnimationLength"}
private

Referenced by onSetUniforms().

◆ m_crack_animation_length_i

int GameGlobalShaderUniformSetter::m_crack_animation_length_i
private

◆ m_crack_level

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_crack_level {"crackLevel"}
private

Referenced by onSetUniforms().

◆ m_crack_level_i

int GameGlobalShaderUniformSetter::m_crack_level_i = -1
private

Referenced by onSetMaterial(), and onSetUniforms().

◆ m_crack_texture_scale

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_crack_texture_scale {"crackTextureScale"}
private

Referenced by onSetUniforms().

◆ m_crack_texture_scale_i

int GameGlobalShaderUniformSetter::m_crack_texture_scale_i = 0
private

Referenced by onSetMaterial(), and onSetUniforms().

◆ m_day_light

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_day_light {"dayLight"}
private

Referenced by onSetUniforms().

◆ m_exposure_params_pixel

CachedStructPixelShaderSetting<float, 7> GameGlobalShaderUniformSetter::m_exposure_params_pixel
private
Initial value:
{
"exposureParams",
std::array<const char*, 7> {
"luminanceMin", "luminanceMax", "exposureCorrection",
"speedDarkBright", "speedBrightDark", "centerWeightPower",
"compensationFactor"
}}

Referenced by onSetUniforms().

◆ m_minimap_yaw

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_minimap_yaw {"yawVec"}
private

Referenced by onSetUniforms().

◆ m_moon_brightness_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_moon_brightness_pixel {"moonBrightness"}
private

Referenced by onSetUniforms().

◆ m_moon_position_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_moon_position_pixel {"moonPositionScreen"}
private

Referenced by onSetUniforms().

◆ m_saturation_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_saturation_pixel {"saturation"}
private

Referenced by onSetUniforms().

◆ m_sky

Sky* GameGlobalShaderUniformSetter::m_sky
private

◆ m_sun_brightness_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_sun_brightness_pixel {"sunBrightness"}
private

Referenced by onSetUniforms().

◆ m_sun_position_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderUniformSetter::m_sun_position_pixel {"sunPositionScreen"}
private

Referenced by onSetUniforms().

◆ m_texel_size0

v2f GameGlobalShaderUniformSetter::m_texel_size0
private

Referenced by onSetMaterial(), and onSetUniforms().

◆ m_texel_size0_pixel

CachedPixelShaderSetting<float, 2> GameGlobalShaderUniformSetter::m_texel_size0_pixel {"texelSize0"}
private

Referenced by onSetUniforms().

◆ m_texel_size0_vertex

CachedVertexShaderSetting<float, 2> GameGlobalShaderUniformSetter::m_texel_size0_vertex {"texelSize0"}
private

Referenced by onSetUniforms().

◆ m_user_exposure_compensation

float GameGlobalShaderUniformSetter::m_user_exposure_compensation
private

◆ m_volumetric_light_enabled

bool GameGlobalShaderUniformSetter::m_volumetric_light_enabled
private

◆ m_volumetric_light_strength_pixel

CachedPixelShaderSetting<float> GameGlobalShaderUniformSetter::m_volumetric_light_strength_pixel {"volumetricLightStrength"}
private

Referenced by onSetUniforms().

◆ SETTING_CALLBACKS

std::array<const char*, 1> GameGlobalShaderUniformSetter::SETTING_CALLBACKS
staticconstexprprivate
Initial value:
= {
"exposure_compensation",
}

Referenced by GameGlobalShaderUniformSetter().


The documentation for this class was generated from the following file: