Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
184 changes: 184 additions & 0 deletions package/SKSE/Plugins/CommunityShaders/Translations/en.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions src/FeatureIssues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ namespace FeatureIssues
ImGui::SameLine();
ImGui::Text("%s", T("menu.issues.core_feature_installed", "Core feature already installed"));
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::TextWrapped("This feature is already included as part of the core Open Shaders installation. Uninstall this feature with your mod manager.");
ImGui::TextWrapped("%s", T("menu.issues.core_feature_installed_tooltip", "This feature is already included as part of the core Open Shaders installation. Uninstall this feature with your mod manager."));
}
} else if (issue.IsVersionMismatch()) {
ImGui::SameLine();
Expand Down Expand Up @@ -732,10 +732,10 @@ namespace FeatureIssues
ImGui::TextWrapped("%s", T("menu.issues.unknown_delete_warning",
"This is an UNKNOWN feature. If it modified core shader files (outside of its own folder), deleting these files alone will NOT fix shader compilation issues."));
ImGui::Spacing();
ImGui::TextColored(theme.StatusPalette.Warning, "If compilation issues persist after deletion:");
ImGui::BulletText("Completely uninstall the feature via your mod manager");
ImGui::BulletText("Check for modified files in Data/Shaders/ (not in feature subfolders)");
ImGui::BulletText("Consider reinstalling Open Shaders if issues persist");
ImGui::TextColored(theme.StatusPalette.Warning, "%s", T("menu.issues.compilation_persist_warning", "If compilation issues persist after deletion:"));
ImGui::BulletText("%s", T("menu.issues.uninstall_via_mod_manager", "Completely uninstall the feature via your mod manager"));
ImGui::BulletText("%s", T("menu.issues.check_modified_files", "Check for modified files in Data/Shaders/ (not in feature subfolders)"));
ImGui::BulletText("%s", T("menu.issues.reinstall_cs", "Consider reinstalling Open Shaders if issues persist"));
ImGui::Spacing();
ImGui::Separator();
ImGui::Spacing();
Expand Down Expand Up @@ -1532,15 +1532,15 @@ namespace FeatureIssues
auto* menu = Menu::GetSingleton();
const auto& themeSettings = menu->GetTheme();

auto sectionWrapper = Util::SectionWrapper("Feature Issue Testing",
"These tools create test INI files to trigger all known feature issue types for testing purposes.",
auto sectionWrapper = Util::SectionWrapper(T("menu.issues.test.feature_issue_testing", "Feature Issue Testing"),
T("menu.issues.test.feature_issue_testing_desc", "These tools create test INI files to trigger all known feature issue types for testing purposes."),
themeSettings.Palette.Text);

if (sectionWrapper) {
const bool hasActiveTests = HasActiveTestInis();
if (hasActiveTests) { // Warning section using theme colors
ImGui::PushStyleColor(ImGuiCol_Text, themeSettings.StatusPalette.RestartNeeded);
ImGui::TextWrapped("Test INI files are currently active. Restart CS to see feature issues.");
ImGui::TextWrapped("%s", T("menu.issues.test.active_inis_warning", "Test INI files are currently active. Restart CS to see feature issues."));
ImGui::PopStyleColor(); // Show detailed test state information
ImGui::Spacing();
ImGui::PushStyleColor(ImGuiCol_Text, themeSettings.StatusPalette.RestartNeeded);
Expand All @@ -1557,19 +1557,19 @@ namespace FeatureIssues
themeSettings.StatusPalette.RestartNeeded,
themeSettings.StatusPalette.CurrentHotkey);

if (ImGui::Button("Create Test INIs", { -1, 0 })) {
if (ImGui::Button(T("menu.issues.test.create_test_inis", "Create Test INIs"), { -1, 0 })) {
auto testInis = CreateTestInis();
logger::info("Created {} test INI files for feature issue testing", testInis.size());
}
}

if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text(
"Creates test INI files that trigger all known feature issue cases:\n"
"- Obsolete features (ComplexParallaxMaterials, TerrainBlending, etc.)\n"
"- Unknown features (fake non-existent features)\n"
"- Version mismatch (modifies existing feature version)\n"
"Restart CS after creating to see the issues in action.");
ImGui::Text("%s", T("menu.issues.test.create_test_inis_tooltip",
"Creates test INI files that trigger all known feature issue cases:\n"
"- Obsolete features (ComplexParallaxMaterials, TerrainBlending, etc.)\n"
"- Unknown features (fake non-existent features)\n"
"- Version mismatch (modifies existing feature version)\n"
"Restart CS after creating to see the issues in action."));
}

// Restore button
Expand All @@ -1580,7 +1580,7 @@ namespace FeatureIssues
themeSettings.StatusPalette.Error,
themeSettings.StatusPalette.CurrentHotkey);

if (ImGui::Button("Restore", { -1, 0 })) {
if (ImGui::Button(T("menu.issues.test.restore", "Restore"), { -1, 0 })) {
auto& testInis = GetCurrentTestInis();
if (RestoreOriginalState(testInis)) {
logger::info("Successfully restored original state");
Expand All @@ -1591,10 +1591,10 @@ namespace FeatureIssues
}

if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text(
"Removes all test INI files and restores any modified INI files to their original state.\n"
"This undoes all changes made by 'Create Test INIs'.\n"
"Restart CS after restoring to see normal operation.");
ImGui::Text("%s", T("menu.issues.test.restore_tooltip",
"Removes all test INI files and restores any modified INI files to their original state.\n"
"This undoes all changes made by 'Create Test INIs'.\n"
"Restart CS after restoring to see normal operation."));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Features/DynamicCubemaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void DynamicCubemaps::DrawSettings()
if (ImGui::TreeNodeEx(T(TKEY("screen_space_reflections"), "Screen Space Reflections"), ImGuiTreeNodeFlags_DefaultOpen)) {
recompileFlag |= ImGui::Checkbox(T(TKEY("enable_ssr"), "Enable Screen Space Reflections"), reinterpret_cast<bool*>(&settings.EnabledSSR));
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text("Enable Screen Space Reflections on Water");
ImGui::Text("%s", T(TKEY("enable_ssr_tooltip"), "Enable Screen Space Reflections on Water"));
}
if (globals::game::isVR)
Util::UI::DrawSettingDiff(bootSnapshot, settings, &Settings::EnabledSSR);
Expand Down Expand Up @@ -119,7 +119,7 @@ void DynamicCubemaps::DrawSettings()
ImGui::TreePop();
}
if (globals::game::isVR) {
if (ImGui::TreeNodeEx("Advanced VR Settings", ImGuiTreeNodeFlags_DefaultOpen)) {
if (ImGui::TreeNodeEx(T(TKEY("advanced_vr_settings"), "Advanced VR Settings"), ImGuiTreeNodeFlags_DefaultOpen)) {
Util::RenderImGuiSettingsTree(iniVRCubeMapSettings, "VR");
Util::RenderImGuiSettingsTree(hiddenVRCubeMapSettings, "hiddenVR");
ImGui::TreePop();
Expand Down
52 changes: 28 additions & 24 deletions src/Features/LightLimitFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Features/LightLimitFix/SettingsSanitize.h"
#include "Features/LightLimitFix/ShadowCasterMath.h"
#include "Globals.h"
#include "I18n/I18n.h"
#include "InverseSquareLighting.h"
#include "LinearLighting.h"
#include "Utils/UI.h"
Expand Down Expand Up @@ -116,9 +117,10 @@ void LightLimitFix::DrawSettings()

ShadowCasterManager::DrawSettings(settings.ShadowSettings);

if (ImGui::TreeNodeEx("Statistics", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text(std::format("Clustered Light Count : {}", lightCount).c_str());
ImGui::Text(std::format("Particle Lights Count : {}", currentParticleLights.size()).c_str());
if (ImGui::TreeNodeEx(T("feature.light_limit_fix.statistics", "Statistics"), ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text(std::vformat(T("feature.light_limit_fix.stat_clustered_light_count", "Clustered Light Count : {}"), std::make_format_args(lightCount)).c_str());
auto particleLightCount = currentParticleLights.size();
ImGui::Text(std::vformat(T("feature.light_limit_fix.stat_particle_lights_count", "Particle Lights Count : {}"), std::make_format_args(particleLightCount)).c_str());
ImGui::TreePop();
}

Expand Down Expand Up @@ -318,41 +320,43 @@ void LightLimitFix::DrawSettings()
}

///////////////////////////////
ImGui::SeparatorText("Debug");
ImGui::SeparatorText(T("feature.light_limit_fix.debug", "Debug"));

if (ImGui::TreeNode("Light Limit Visualization")) {
ImGui::Checkbox("Enable Lights Visualisation", &EnableLightsVisualisation);
if (ImGui::TreeNode(T("feature.light_limit_fix.light_limit_vis", "Light Limit Visualization"))) {
ImGui::Checkbox(T("feature.light_limit_fix.enable_lights_vis", "Enable Lights Visualisation"), &EnableLightsVisualisation);
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text("Enables visualization of the light limit\n");
ImGui::Text("%s", T("feature.light_limit_fix.enable_lights_vis_tooltip", "Enables visualization of the light limit\n"));
}

{
static const char* comboOptions[] = {
"Light Limit",
"Strict Lights Count",
"Clustered Lights Count",
"Shadow Mask",
"Shadow Light Count",
"Point Light Shadow Factor",
"Unshadowed Point Lights",
"Shadow Caster Density",
"Shadow Slot Index Color",
"Light Type Visualization",
const char* comboOptions[] = {
T("feature.light_limit_fix.lights_vis_mode_opt_light_limit", "Light Limit"),
T("feature.light_limit_fix.lights_vis_mode_opt_strict_lights_count", "Strict Lights Count"),
T("feature.light_limit_fix.lights_vis_mode_opt_clustered_lights_count", "Clustered Lights Count"),
T("feature.light_limit_fix.lights_vis_mode_opt_shadow_mask", "Shadow Mask"),
T("feature.light_limit_fix.lights_vis_mode_opt_shadow_light_count", "Shadow Light Count"),
T("feature.light_limit_fix.lights_vis_mode_opt_point_light_shadow_factor", "Point Light Shadow Factor"),
T("feature.light_limit_fix.lights_vis_mode_opt_unshadowed_point_lights", "Unshadowed Point Lights"),
T("feature.light_limit_fix.lights_vis_mode_opt_shadow_caster_density", "Shadow Caster Density"),
T("feature.light_limit_fix.lights_vis_mode_opt_shadow_slot_index_color", "Shadow Slot Index Color"),
T("feature.light_limit_fix.lights_vis_mode_opt_light_type_visualization", "Light Type Visualization"),
};
// Round-trip through int instead of `(int*)&uint` to avoid strict-aliasing UB
// (ImGui has no ComboScalar). Clamp on the way in defends against any stale
// persisted value that might still exist from older builds.
int visMode = std::clamp(static_cast<int>(LightsVisualisationMode),
0, IM_ARRAYSIZE(comboOptions) - 1);
ImGui::Combo("Lights Visualisation Mode", &visMode, comboOptions, IM_ARRAYSIZE(comboOptions));
ImGui::Combo(T("feature.light_limit_fix.lights_vis_mode", "Lights Visualisation Mode"), &visMode, comboOptions, IM_ARRAYSIZE(comboOptions));
Comment thread
alandtse marked this conversation as resolved.
LightsVisualisationMode = static_cast<uint>(visMode);
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text(
"Light Limit: Red when the strict light limit is reached (>=7 portal-strict lights).\n"
"\n"
"Strict Lights Count: Heatmap of portal-strict lights per pixel (blue=0, red=15).\n"
"\n"
"Clustered Lights Count: Heatmap of dynamic lights in each screen tile (blue=0, red=128).");
"%s",
T("feature.light_limit_fix.lights_vis_mode_tooltip",
"Light Limit: Red when the strict light limit is reached (>=7 portal-strict lights).\n"
"\n"
"Strict Lights Count: Heatmap of portal-strict lights per pixel (blue=0, red=15).\n"
"\n"
"Clustered Lights Count: Heatmap of dynamic lights in each screen tile (blue=0, red=128)."));
ShadowCasterManager::DrawVisualisationTooltipShadowModes();
}
}
Expand Down
15 changes: 8 additions & 7 deletions src/Features/LightLimitFix.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ struct LightLimitFix : OverlayFeature
virtual std::pair<std::string, std::vector<std::string>> GetFeatureSummary() override
{
return {
"Light Limit Fix removes the vanilla game's 4-light limit, allowing unlimited dynamic lights in scenes. "
"It also extends shadow support to all point and spot lights.",
{ "Removes 4-light limit",
"Unlimited dynamic lights",
"Shadow support for point and spot lights",
"Improved lighting quality",
"Particle lights from configurable INI" }
T("feature.light_limit_fix.description",
"Light Limit Fix removes the vanilla game's 4-light limit, allowing unlimited dynamic lights in scenes. "
"It also extends shadow support to all point and spot lights."),
{ T("feature.light_limit_fix.key_feature_1", "Removes 4-light limit"),
T("feature.light_limit_fix.key_feature_2", "Unlimited dynamic lights"),
T("feature.light_limit_fix.key_feature_3", "Shadow support for point and spot lights"),
T("feature.light_limit_fix.key_feature_4", "Improved lighting quality"),
T("feature.light_limit_fix.key_feature_5", "Particle lights from configurable INI") }
};
}

Expand Down
8 changes: 4 additions & 4 deletions src/Features/RenderDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void RenderDoc::DrawSettings()

// Include enable toggle and annotation forcing logic here
bool prevRenderDocCapture = settings.enableCapture;
if (ImGui::Checkbox("Enable RenderDoc Capture", &settings.enableCapture)) {
if (ImGui::Checkbox(T(TKEY("enable_capture"), "Enable RenderDoc Capture"), &settings.enableCapture)) {
if (settings.enableCapture && !prevRenderDocCapture) {
globals::state->useFrameAnnotations = globals::state->frameAnnotations;
globals::state->frameAnnotations = true;
Expand All @@ -156,8 +156,8 @@ void RenderDoc::DrawSettings()
// pending banner below it -- the previous ordering drew the banner between
// the checkbox and the tooltip, so a pending banner would steal the hover.
Util::UI::RestartGatedAnnotate(bootSnapshot, settings, &Settings::enableCapture, [] {
ImGui::TextUnformatted("Enable RenderDoc frame capture for providing debug captures to the Open Shaders team (or upstream Community Shaders for upstream-relevant issues).");
ImGui::TextUnformatted("Enabling capture will force-enable frame annotations for easier debugging and will restore the previous setting when disabled.");
ImGui::TextUnformatted(T(TKEY("enable_capture_tooltip"), "Enable RenderDoc frame capture for providing debug captures to the Open Shaders team (or upstream Community Shaders for upstream-relevant issues)."));
ImGui::TextUnformatted(T(TKEY("enable_capture_tooltip2"), "Enabling capture will force-enable frame annotations for easier debugging and will restore the previous setting when disabled."));
});

// The rest of the UI renders only when capture is active
Expand All @@ -171,7 +171,7 @@ void RenderDoc::DrawSettings()
}

if (!renderDocCaptureEnabled && renderDocActive) {
ImGui::TextColored(themeSettings.StatusPalette.Warning, "Performance will be severely impacted until the game is restarted.");
ImGui::TextColored(themeSettings.StatusPalette.Warning, "%s", T(TKEY("restart_to_disable"), "Performance will be severely impacted until the game is restarted."));
return;
}

Expand Down
24 changes: 13 additions & 11 deletions src/Features/ScreenSpaceGI.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@ struct ScreenSpaceGI : Feature
virtual std::pair<std::string, std::vector<std::string>> GetFeatureSummary() override
{
std::string desc =
"Screen Space Global Illumination adds realistic indirect lighting and "
"ambient occlusion to the game. This technique simulates how light "
"bounces off surfaces to illuminate other objects naturally.";
T("feature.screen_space_gi.description",
"Screen Space Global Illumination adds realistic indirect lighting and "
"ambient occlusion to the game. This technique simulates how light "
"bounces off surfaces to illuminate other objects naturally.");
if (globals::game::isVR) {
desc +=
"\n\nWarning: In VR, this feature may have visual artifacts and "
"can have a significant performance impact due to the nature of "
"screen space effects.";
T("feature.screen_space_gi.vr_warning",
"\n\nWarning: In VR, this feature may have visual artifacts and "
"can have a significant performance impact due to the nature of "
"screen space effects.");
}
return std::make_pair(
desc,
std::vector<std::string>{
"Realistic indirect lighting",
"Enhanced ambient occlusion",
"Improved visual depth and atmosphere",
"Temporal denoising for smooth results",
"Configurable quality and performance settings" });
T("feature.screen_space_gi.key_feature_1", "Realistic indirect lighting"),
T("feature.screen_space_gi.key_feature_2", "Enhanced ambient occlusion"),
T("feature.screen_space_gi.key_feature_3", "Improved visual depth and atmosphere"),
T("feature.screen_space_gi.key_feature_4", "Temporal denoising for smooth results"),
T("feature.screen_space_gi.key_feature_5", "Configurable quality and performance settings") });
}

virtual void RestoreDefaultSettings() override;
Expand Down
Loading
Loading