mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-21 18:17:03 +08:00
feat: water effects (#19)
* feat(shaders): add lighting to block accumulation OIT shaders * feat(renderer): add water rendering with OIT and new shaders * feat(water): implement screen-space reflection and refraction for water with depth fade and perturbation * refactor(shader): replace glUniform calls with generic set_loc and remove cached locations * feat(water): add noise-based caustics and configurable fog density * fix(water shader): update depth fade and remove underwater check - Increase DEPTH_FADE_DISTANCE from 8 to 10 - Remove conditional so depth fade always applies - Darken deepColor from (0, 0.08, 0.15) to (0, 0.015, 0.045) * feat(underwater): add volume scattering and shadow mapping for light shafts
This commit is contained in:
@@ -657,6 +657,16 @@ void DevPanel::show_shader_tab_item() {
|
||||
ImGui::SliderFloat("Cloud Threshold High",
|
||||
&m_app.renderer().cloud_threshold_high(), 0.0f,
|
||||
1.0f);
|
||||
ImGui::SliderFloat("Water Refract Strength",
|
||||
&m_app.renderer().refract_strength(), 0.0f, 1.0f);
|
||||
ImGui::Checkbox("Water Perturb", &m_app.renderer().water_perturb());
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("WaterDepthFade", &m_app.renderer().water_depth_fade());
|
||||
ImGui::SliderFloat("Underwater Fog Density",
|
||||
&m_app.renderer().underwater_fog_density(), 0.0f,
|
||||
1.0f);
|
||||
ImGui::SliderFloat("Water Density", &m_app.renderer().water_density(),
|
||||
0.0f, 1.0f);
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user