mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-18 00:27:02 +08:00
feat(renderer): add runtime shader and shadow mode controls
Introduce user-controllable shader on/off, shadow mode (rotated Poisson disk, 3x3 grid, or off), light cull face, and discard transparent in depth pass. Expose all settings in new dev panel "shader" tab. Move ambient strength slider to the new tab.
This commit is contained in:
@@ -56,6 +56,7 @@ private:
|
||||
void show_world_tab_item();
|
||||
void show_player_tab_item();
|
||||
void show_items_tab_item();
|
||||
void show_shader_tab_item();
|
||||
|
||||
void update_config_view();
|
||||
void update_player_profile();
|
||||
|
||||
@@ -30,6 +30,11 @@ public:
|
||||
void updata_framebuffer(int width, int height);
|
||||
float& ambient_strength();
|
||||
|
||||
bool& discard_transparent();
|
||||
bool& shader_on();
|
||||
int& shadow_mode();
|
||||
int& light_cull_face();
|
||||
|
||||
private:
|
||||
static constexpr glm::vec3 SUNLIGHT_COLOR{1.0f, 1.0f, 1.0f};
|
||||
static constexpr glm::vec3 SUN_COLOR{1.00f, 0.95f, 0.80f};
|
||||
@@ -47,6 +52,10 @@ private:
|
||||
const TextureManager& m_texture_manager;
|
||||
World& m_world;
|
||||
|
||||
bool m_discard_tranparent = true;
|
||||
bool m_shader_on = true;
|
||||
int m_shadow_mode = 0;
|
||||
int m_light_cull_face = 0;
|
||||
float m_aspect = 0.0f;
|
||||
float m_fov = DEFAULT_FOV;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user