mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-04 00:38:59 -04:00
phong
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 8af9057689...8899ca90c1
@@ -89,6 +89,13 @@ struct UserSettings {
|
||||
|
||||
|
||||
// Graphics
|
||||
ConfigVar<bool> enhancedLighting;
|
||||
ConfigVar<bool> enableSpecularLighting;
|
||||
ConfigVar<bool> enableRimLighting;
|
||||
ConfigVar<float> specularIntensity;
|
||||
ConfigVar<float> rimIntensity;
|
||||
ConfigVar<float> ambientLightMultiplier;
|
||||
ConfigVar<float> diffuseLightMultiplier;
|
||||
ConfigVar<BloomMode> bloomMode;
|
||||
ConfigVar<float> bloomMultiplier;
|
||||
ConfigVar<bool> disableWaterRefraction;
|
||||
|
||||
@@ -167,6 +167,60 @@ namespace dusk {
|
||||
|
||||
config::ImGuiCheckbox("Enable Depth of Field", getSettings().game.enableDepthOfField);
|
||||
|
||||
ImGui::SeparatorText("Lighting");
|
||||
|
||||
if (config::ImGuiCheckbox("Enhanced Lighting", getSettings().game.enhancedLighting)) {
|
||||
aurora_set_enhanced_lighting(getSettings().game.enhancedLighting);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Enables per-pixel lighting with Blinn-Phong shading.");
|
||||
}
|
||||
|
||||
const bool enhancedLightingEnabled = getSettings().game.enhancedLighting.getValue();
|
||||
if (!enhancedLightingEnabled) { ImGui::BeginDisabled(); }
|
||||
|
||||
if (config::ImGuiCheckbox("Specular Highlights", getSettings().game.enableSpecularLighting)) {
|
||||
aurora_set_specular_lighting(getSettings().game.enableSpecularLighting);
|
||||
}
|
||||
if (config::ImGuiCheckbox("Rim Lighting", getSettings().game.enableRimLighting)) {
|
||||
aurora_set_rim_lighting(getSettings().game.enableRimLighting);
|
||||
}
|
||||
|
||||
{
|
||||
float v = getSettings().game.specularIntensity.getValue();
|
||||
if (ImGui::SliderFloat("Specular Intensity", &v, 0.0f, 1.0f, "%.2f")) {
|
||||
getSettings().game.specularIntensity.setValue(v);
|
||||
aurora_set_specular_intensity(v);
|
||||
config::Save();
|
||||
}
|
||||
}
|
||||
{
|
||||
float v = getSettings().game.rimIntensity.getValue();
|
||||
if (ImGui::SliderFloat("Rim Intensity", &v, 0.0f, 0.5f, "%.3f")) {
|
||||
getSettings().game.rimIntensity.setValue(v);
|
||||
aurora_set_rim_intensity(v);
|
||||
config::Save();
|
||||
}
|
||||
}
|
||||
{
|
||||
float v = getSettings().game.ambientLightMultiplier.getValue();
|
||||
if (ImGui::SliderFloat("Ambient Multiplier", &v, 0.0f, 3.0f, "%.2f")) {
|
||||
getSettings().game.ambientLightMultiplier.setValue(v);
|
||||
aurora_set_ambient_multiplier(v);
|
||||
config::Save();
|
||||
}
|
||||
}
|
||||
{
|
||||
float v = getSettings().game.diffuseLightMultiplier.getValue();
|
||||
if (ImGui::SliderFloat("Diffuse Multiplier", &v, 0.0f, 3.0f, "%.2f")) {
|
||||
getSettings().game.diffuseLightMultiplier.setValue(v);
|
||||
aurora_set_diffuse_multiplier(v);
|
||||
config::Save();
|
||||
}
|
||||
}
|
||||
|
||||
if (!enhancedLightingEnabled) { ImGui::EndDisabled(); }
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "fmt/format.h"
|
||||
#include "imgui.h"
|
||||
#include "aurora/gfx.h"
|
||||
#include <aurora/gfx.h>
|
||||
|
||||
#include "ImGuiConfig.hpp"
|
||||
#include "dusk/hotkeys.h"
|
||||
@@ -80,6 +80,12 @@ namespace dusk {
|
||||
|
||||
auto& collisionView = getTransientSettings().collisionView;
|
||||
if (ImGui::BeginMenu("Graphics Settings")) {
|
||||
bool enhancedLighting = getSettings().game.enhancedLighting;
|
||||
if (ImGui::Checkbox("Enhanced Lighting", &enhancedLighting)) {
|
||||
getSettings().game.enhancedLighting.setValue(enhancedLighting);
|
||||
aurora_set_enhanced_lighting(enhancedLighting);
|
||||
config::Save();
|
||||
}
|
||||
bool disableWaterRefraction = getSettings().game.disableWaterRefraction;
|
||||
if (ImGui::Checkbox("Disable Water Refraction", &disableWaterRefraction)) {
|
||||
getSettings().game.disableWaterRefraction.setValue(disableWaterRefraction);
|
||||
|
||||
@@ -48,6 +48,13 @@ UserSettings g_userSettings = {
|
||||
.enableAchievementNotifications {"game.enableAchievementNotifications", false},
|
||||
|
||||
// Graphics
|
||||
.enhancedLighting {"game.enhancedLighting", true},
|
||||
.enableSpecularLighting {"game.enableSpecularLighting", true},
|
||||
.enableRimLighting {"game.enableRimLighting", true},
|
||||
.specularIntensity {"game.specularIntensity", 0.2f},
|
||||
.rimIntensity {"game.rimIntensity", 0.08f},
|
||||
.ambientLightMultiplier {"game.ambientLightMultiplier", 1.0f},
|
||||
.diffuseLightMultiplier {"game.diffuseLightMultiplier", 1.0f},
|
||||
.bloomMode {"game.bloomMode", BloomMode::Classic},
|
||||
.bloomMultiplier {"game.bloomMultiplier", 1.0f},
|
||||
.disableWaterRefraction {"game.disableWaterRefraction", false},
|
||||
@@ -151,6 +158,13 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.freeCameraSensitivity);
|
||||
Register(g_userSettings.game.disableMainHUD);
|
||||
Register(g_userSettings.game.pauseOnFocusLost);
|
||||
Register(g_userSettings.game.enhancedLighting);
|
||||
Register(g_userSettings.game.enableSpecularLighting);
|
||||
Register(g_userSettings.game.enableRimLighting);
|
||||
Register(g_userSettings.game.specularIntensity);
|
||||
Register(g_userSettings.game.rimIntensity);
|
||||
Register(g_userSettings.game.ambientLightMultiplier);
|
||||
Register(g_userSettings.game.diffuseLightMultiplier);
|
||||
Register(g_userSettings.game.bloomMode);
|
||||
Register(g_userSettings.game.bloomMultiplier);
|
||||
Register(g_userSettings.game.disableWaterRefraction);
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
#include <aurora/aurora.h>
|
||||
#include <aurora/event.h>
|
||||
#include <aurora/gfx.h>
|
||||
#include <aurora/main.h>
|
||||
#include <aurora/dvd.h>
|
||||
#include <dolphin/dvd.h>
|
||||
@@ -558,6 +559,13 @@ int game_main(int argc, char* argv[]) {
|
||||
config.allowTextureReplacements = true;
|
||||
config.allowTextureDumps = false;
|
||||
auroraInfo = aurora_initialize(argc, argv, &config);
|
||||
aurora_set_enhanced_lighting(dusk::getSettings().game.enhancedLighting);
|
||||
aurora_set_specular_lighting(dusk::getSettings().game.enableSpecularLighting);
|
||||
aurora_set_rim_lighting(dusk::getSettings().game.enableRimLighting);
|
||||
aurora_set_specular_intensity(dusk::getSettings().game.specularIntensity);
|
||||
aurora_set_rim_intensity(dusk::getSettings().game.rimIntensity);
|
||||
aurora_set_ambient_multiplier(dusk::getSettings().game.ambientLightMultiplier);
|
||||
aurora_set_diffuse_multiplier(dusk::getSettings().game.diffuseLightMultiplier);
|
||||
}
|
||||
|
||||
#ifdef DUSK_DISCORD_RPC
|
||||
|
||||
Reference in New Issue
Block a user