diff --git a/src/Features/DistantTreeLighting.cpp b/src/Features/DistantTreeLighting.cpp index 068c5abb69..35201f304c 100644 --- a/src/Features/DistantTreeLighting.cpp +++ b/src/Features/DistantTreeLighting.cpp @@ -13,35 +13,64 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( void DistantTreeLighting::DrawSettings() { if (ImGui::TreeNodeEx("Complex Tree LOD", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Enables advanced lighting simulation on tree LOD.\n" - "Requires DynDOLOD.\n" - "See https://dyndolod.info/ for more information."); ImGui::Checkbox("Enable Complex Tree LOD", (bool*)&settings.EnableComplexTreeLOD); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables advanced lighting simulation on tree LOD.\n"); + ImGui::Text("Requires DynDOLOD.\n"); + ImGui::Text("See https://dyndolod.info/ for more information."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Lights", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("Fix for trees not being affected by sunlight scale."); ImGui::Checkbox("Enable Directional Light Fix", (bool*)&settings.EnableDirLightFix); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Fix for trees not being affected by sunlight scale."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Effects", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Soft lighting controls how evenly lit an object is.\n" - "Back lighting illuminates the back face of an object.\n" - "Combined to model the transport of light through the surface."); - ImGui::SliderFloat("Subsurface Scattering Amount", &settings.SubsurfaceScatteringAmount, 0.0f, 1.0f); + ImGui::SliderFloat("SSS Amount", &settings.SubsurfaceScatteringAmount, 0.0f, 1.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Subsurface Scattering (SSS) amount\n"); + ImGui::Text("Soft lighting controls how evenly lit an object is.\n"); + ImGui::Text("Back lighting illuminates the back face of an object.\n"); + ImGui::Text("Combined to model the transport of light through the surface."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Vanilla", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("Darkens lighting relative fog strength."); ImGui::SliderFloat("Fog Dimmer Amount", &settings.FogDimmerAmount, 0.0f, 1.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Darkens lighting relative fog strength."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); } diff --git a/src/Features/ExtendedMaterials.cpp b/src/Features/ExtendedMaterials.cpp index faed6bf608..f3463fef37 100644 --- a/src/Features/ExtendedMaterials.cpp +++ b/src/Features/ExtendedMaterials.cpp @@ -17,56 +17,128 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( void ExtendedMaterials::DrawSettings() { if (ImGui::TreeNodeEx("Complex Material", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Enables support for the Complex Material specification which makes use of the environment mask.\n" - "This includes parallax, as well as more realistic metals and specular reflections.\n" - "May lead to some warped textures on modded content which have an invalid alpha channel in their environment mask."); ImGui::Checkbox("Enable Complex Material", (bool*)&settings.EnableComplexMaterial); - + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables support for the Complex Material specification which makes use of the environment mask.\n"); + ImGui::Text("This includes parallax, as well as more realistic metals and specular reflections.\n"); + ImGui::Text("May lead to some warped textures on modded content which have an invalid alpha channel in their environment mask."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Contact Refinement Parallax Mapping", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("Enables parallax on standard meshes made for parallax."); ImGui::Checkbox("Enable Parallax", (bool*)&settings.EnableParallax); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables parallax on standard meshes made for parallax."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped( - "Enables terrain parallax using the alpha channel of each landscape texture.\n" - "Therefore, all landscape textures must support parallax for this effect to work properly."); ImGui::Checkbox("Enable Terrain", (bool*)&settings.EnableTerrain); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables terrain parallax using the alpha channel of each landscape texture.\n"); + ImGui::Text("Therefore, all landscape textures must support parallax for this effect to work properly."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped( - "Doubles the sample count and approximates the intersection point using Parallax Occlusion Mapping.\n" - "Significantly improves the quality and removes aliasing.\n" - "TAA or the Skyrim Upscaler is recommended when using this option due to CRPM artifacts."); ImGui::Checkbox("Enable High Quality", (bool*)&settings.EnableHighQuality); - - ImGui::TextWrapped("The furthest distance from the camera which uses parallax."); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Doubles the sample count and approximates the intersection point using Parallax Occlusion Mapping.\n"); + ImGui::Text("Significantly improves the quality and removes aliasing.\n"); + ImGui::Text("TAA or the Skyrim Upscaler is recommended when using this option due to CRPM artifacts."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::Spacing(); + ImGui::Spacing(); ImGui::SliderInt("Max Distance", (int*)&settings.MaxDistance, 0, 4096); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("The furthest distance from the camera which uses parallax."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("The percentage of the max distance which uses CRPM."); ImGui::SliderFloat("CRPM Range", &settings.CRPMRange, 0.0f, 1.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("The percentage of the max distance which uses Contact Refinement Parallax Mapping (CRPM)."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped( - "The range that parallax blends from POM to bump mapping, and bump mapping to nothing.\n" - "This value should be set as low as possible due to the performance impact of blending POM and relief mapping."); ImGui::SliderFloat("Blend Range", &settings.BlendRange, 0.0f, settings.CRPMRange); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("The range that parallax blends from Parallax Occlusion Mapping (POM) to bump mapping, and bump mapping to nothing.\n"); + ImGui::Text("This value should be set as low as possible due to the performance impact of blending POM and relief mapping."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("The range between the highest and lowest point a surface can be offset by."); ImGui::SliderFloat("Height", &settings.Height, 0, 0.2f); - + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("The range between the highest and lowest point a surface can be offset by."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Approximate Soft Shadows", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Enables cheap soft shadows when using parallax.\n" - "This applies to all directional and point lights."); ImGui::Checkbox("Enable Shadows", (bool*)&settings.EnableShadows); - - ImGui::TextWrapped("Modifying the start and end fade can improve performance and hide obvious texture tiling."); - ImGui::SliderInt("Shadows Start Fade", (int*)&settings.ShadowsStartFade, 0, settings.ShadowsEndFade); - ImGui::SliderInt("Shadows End Fade", (int*)&settings.ShadowsEndFade, settings.ShadowsStartFade, 4096); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables cheap soft shadows when using parallax.\n"); + ImGui::Text("This applies to all directional and point lights."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::Spacing(); + ImGui::Spacing(); + ImGui::TextWrapped("Modifying the shadow start and end fade can improve performance and hide obvious texture tiling."); + ImGui::SliderInt("Start Fade", (int*)&settings.ShadowsStartFade, 0, settings.ShadowsEndFade); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Distance shadows start to fade."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::SliderInt("End Fade", (int*)&settings.ShadowsEndFade, settings.ShadowsStartFade, 4096); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Distance shadows finish fading."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); } diff --git a/src/Features/GrassCollision.cpp b/src/Features/GrassCollision.cpp index 487a58e1e9..9dab2c2eeb 100644 --- a/src/Features/GrassCollision.cpp +++ b/src/Features/GrassCollision.cpp @@ -17,14 +17,33 @@ enum class GrassShaderTechniques void GrassCollision::DrawSettings() { if (ImGui::TreeNodeEx("Grass Collision", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("Allows player collision to modify grass position."); - ImGui::Checkbox("Enable Grass Collision", (bool*)&settings.EnableGrassCollision); - ImGui::TextWrapped("Distance from collision centres to apply collision"); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Allows player collision to modify grass position."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::Spacing(); ImGui::SliderFloat("Radius Multiplier", &settings.RadiusMultiplier, 0.0f, 8.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Distance from collision centres to apply collision"); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Strength of each collision on grass position."); ImGui::SliderFloat("Displacement Multiplier", &settings.DisplacementMultiplier, 0.0f, 32.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Strength of each collision on grass position."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); } diff --git a/src/Features/GrassLighting.cpp b/src/Features/GrassLighting.cpp index d844a35db2..b8ed967154 100644 --- a/src/Features/GrassLighting.cpp +++ b/src/Features/GrassLighting.cpp @@ -20,35 +20,78 @@ enum class GrassShaderTechniques void GrassLighting::DrawSettings() { if (ImGui::TreeNodeEx("Complex Grass", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Specular highlights for complex grass.\n" - "Functions the same as on other objects."); + ImGui::TextWrapped("Specular highlights for complex grass"); ImGui::SliderFloat("Glossiness", &settings.Glossiness, 1.0f, 100.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Specular highlight glossiness."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::SliderFloat("Specular Strength", &settings.SpecularStrength, 0.0f, 1.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Specular highlight strength."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Effects", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped( - "Soft lighting controls how evenly lit an object is.\n" - "Back lighting illuminates the back face of an object.\n" - "Combined to model the transport of light through the surface."); - ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.5f); - ImGui::SliderFloat("Subsurface Scattering Amount", &settings.SubsurfaceScatteringAmount, 0.0f, 2.0f); + ImGui::SliderFloat("SSS Amount", &settings.SubsurfaceScatteringAmount, 0.0f, 2.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Subsurface Scattering (SSS) amount\n"); + ImGui::Text("Soft lighting controls how evenly lit an object is.\n"); + ImGui::Text("Back lighting illuminates the back face of an object.\n"); + ImGui::Text("Combined to model the transport of light through the surface."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Lighting", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("Fix for grass not being affected by sunlight scale."); ImGui::Checkbox("Enable Directional Light Fix", (bool*)&settings.EnableDirLightFix); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Fix for grass not being affected by sunlight scale."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Darkens the grass textures to look better with the new lighting"); + ImGui::Spacing(); + ImGui::Spacing(); + ImGui::TextWrapped("Grass Color"); ImGui::SliderFloat("Brightness", &settings.Brightness, 0.0f, 1.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Darkens the grass textures to look better with the new lighting"); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Boosts the vibrancy of textures"); ImGui::SliderFloat("Saturation", &settings.Saturation, 1.0f, 2.0f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Boosts the vibrancy of textures"); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); } diff --git a/src/Features/LightLimitFix.cpp b/src/Features/LightLimitFix.cpp index 84cd95fdee..7ca9fa6be2 100644 --- a/src/Features/LightLimitFix.cpp +++ b/src/Features/LightLimitFix.cpp @@ -26,39 +26,127 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( void LightLimitFix::DrawSettings() { - if (ImGui::TreeNodeEx("Miscellaneous", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::TextWrapped("All lights cast small shadows. Performance impact."); - ImGui::Checkbox("Enable Contact Shadows", &settings.EnableContactShadows); + if (ImGui::TreeNodeEx("Particle Lights", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Checkbox("Enable Particle Lights", &settings.EnableParticleLights); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables Particle Lights."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Torches and light spells will cast shadows in first-person. Performance impact."); - ImGui::Checkbox("Enable First-Person Shadows", &settings.EnableFirstPersonShadows); + ImGui::Checkbox("Enable Culling", &settings.EnableParticleLightsCulling); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Significantly improves performance by not rendering empty textures. Only disable if you are encountering issues."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("- Visualise the light limit; Red when the \"strict\" light limit is reached (portal-strict lights).\n - Visualise the number of strict lights. \n - Visualise the number of clustered lights."); - ImGui::Checkbox("Enable Lights Visualisation", &settings.EnableLightsVisualisation); + ImGui::Checkbox("Enable Detection", &settings.EnableParticleLightsDetection); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Adds particle lights to the player light level, so that NPCs can detect them for stealth and gameplay."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - { - static const char* comboOptions[] = { "Light Limit", "Strict Lights Count", "Clustered Lights Count" }; - ImGui::Combo("Lights Visualisation Mode", (int*)&settings.LightsVisualisationMode, comboOptions, 3); + ImGui::Checkbox("Enable Optimization", &settings.EnableParticleLightsOptimization); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Merges vertices which are close enough to each other to significantly improve performance."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::SliderInt("Optimisation Cluster Radius", (int*)&settings.ParticleLightsOptimisationClusterRadius, 1, 64); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Radius to use for clustering lights."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); + + ImGui::TextWrapped("Particle Lights Color"); + ImGui::SliderFloat("Brightness", &settings.ParticleLightsBrightness, 0.0, 1.0, "%.2f"); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Particle light brightness."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + ImGui::SliderFloat("Saturation", &settings.ParticleLightsSaturation, 1.0, 2.0, "%.2f"); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Particle light saturation."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } - if (ImGui::TreeNodeEx("Particle Lights", ImGuiTreeNodeFlags_DefaultOpen)) { - ImGui::Checkbox("Enable Particle Lights", &settings.EnableParticleLights); - ImGui::TextWrapped("Significantly improves performance by not rendering empty textures. Only disable if you are encountering issues."); - ImGui::Checkbox("Enable Culling", &settings.EnableParticleLightsCulling); + if (ImGui::TreeNodeEx("Shadows", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Checkbox("Enable Contact Shadows", &settings.EnableContactShadows); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("All lights cast small shadows. Performance impact."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Adds particle lights to the player light level, so that NPCs can detect them for stealth and gameplay."); - ImGui::Checkbox("Enable Detection", &settings.EnableParticleLightsDetection); + ImGui::Checkbox("Enable First-Person Shadows", &settings.EnableFirstPersonShadows); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Torches and light spells will cast shadows in first-person. Performance impact."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::SliderFloat("Brightness", &settings.ParticleLightsBrightness, 0.0, 1.0, "%.2f"); - ImGui::SliderFloat("Saturation", &settings.ParticleLightsSaturation, 1.0, 2.0, "%.2f"); + ImGui::Spacing(); + ImGui::Spacing(); + ImGui::TreePop(); + } - ImGui::TextWrapped("Merges vertices which are close enough to each other to significantly improve performance."); - ImGui::Checkbox("Enable Optimization", &settings.EnableParticleLightsOptimization); - ImGui::SliderInt("Optimisation Cluster Radius", (int*)&settings.ParticleLightsOptimisationClusterRadius, 1, 64); + if (ImGui::TreeNodeEx("Light Limit Visualization", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::Checkbox("Enable Lights Visualisation", &settings.EnableLightsVisualisation); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables visualization of the light limit\n"); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + + { + static const char* comboOptions[] = { "Light Limit", "Strict Lights Count", "Clustered Lights Count" }; + ImGui::Combo("Lights Visualisation Mode", (int*)&settings.LightsVisualisationMode, comboOptions, 3); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text(" - Visualise the light limit. Red when the \"strict\" light limit is reached (portal-strict lights).\n"); + ImGui::Text(" - Visualise the number of strict lights. \n"); + ImGui::Text(" - Visualise the number of clustered lights."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } diff --git a/src/Features/ScreenSpaceShadows.cpp b/src/Features/ScreenSpaceShadows.cpp index 0bbc973e0c..c82e752391 100644 --- a/src/Features/ScreenSpaceShadows.cpp +++ b/src/Features/ScreenSpaceShadows.cpp @@ -21,32 +21,109 @@ void ScreenSpaceShadows::DrawSettings() { if (ImGui::TreeNodeEx("General", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::Checkbox("Enable Screen-Space Shadows", &enabled); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables screen-space shadows."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } - ImGui::TextWrapped("Controls the accuracy of traced shadows."); ImGui::SliderInt("Max Samples", (int*)&settings.MaxSamples, 1, 512); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Controls the accuracy of traced shadows."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Blur Filter", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::SliderFloat("Blur Radius", &settings.BlurRadius, 0, 1); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Blur radius."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::SliderFloat("Blur Depth Dropoff", &settings.BlurDropoff, 0.001f, 0.1f); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Blur depth dropoff."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Near Shadows", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::SliderFloat("Near Distance", &settings.NearDistance, 0, 128); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Near Shadow Distance."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::SliderFloat("Near Thickness", &settings.NearThickness, 0, 128); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Near Shadow Thickness."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::SliderFloat("Near Hardness", &settings.NearHardness, 0, 64); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Near Shadow Hardness."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::TreePop(); } if (ImGui::TreeNodeEx("Far Shadows", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::SliderFloat("Far Distance Scale", &settings.FarDistanceScale, 0, 1); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Far Shadow Distance Scale."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::SliderFloat("Far Thickness Scale", &settings.FarThicknessScale, 0, 1); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Far Shadow Thickness Scale."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::SliderFloat("Far Hardness", &settings.FarHardness, 0, 64); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Far Shadow Hardness."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); } diff --git a/src/Features/WaterBlending.cpp b/src/Features/WaterBlending.cpp index 1a0947735f..0d688a7495 100644 --- a/src/Features/WaterBlending.cpp +++ b/src/Features/WaterBlending.cpp @@ -9,14 +9,44 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( void WaterBlending::DrawSettings() { - if (ImGui::TreeNodeEx("General", ImGuiTreeNodeFlags_DefaultOpen)) { + if (ImGui::TreeNodeEx("Water Blending", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::Checkbox("Enable Water Blending", (bool*)&settings.EnableWaterBlending); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables blending water into the terrain and objects on the water's surface."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::SliderFloat("Water Blend Range", &settings.WaterBlendRange, 0, 3); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Water Blend Range."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Spacing(); + ImGui::Spacing(); ImGui::Checkbox("Enable Water Blending SSR", (bool*)&settings.EnableWaterBlendingSSR); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Enables blending screen-space reflections (SSR) as they are faded out near where the terrain touches large water sources."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::SliderFloat("SSR Blend Range", &settings.SSRBlendRange, 0, 3); + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::Text("Screen-space Reflection (SSR) Blend Range."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::TreePop(); }