Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 40 additions & 11 deletions src/Features/DistantTreeLighting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
128 changes: 100 additions & 28 deletions src/Features/ExtendedMaterials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
27 changes: 23 additions & 4 deletions src/Features/GrassCollision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
67 changes: 55 additions & 12 deletions src/Features/GrassLighting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Loading