mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
expose dynamic reflmap resolution in config.manul
This commit is contained in:
@@ -13,6 +13,7 @@ void MaConfig::Init(const YAML::Node& node) {
|
||||
m_lighting.Init(node["lighting"]);
|
||||
m_weight_lines = node["wire_diameter_lines"].as<float>(.01f);
|
||||
m_weight_tractions = node["wire_diameter_tractions"].as<float>(.005f);
|
||||
m_envmap_resolution = node["envmap_resolution"].as<int>(256);
|
||||
}
|
||||
|
||||
void MaConfig::MaConfigDisplay::Init(const YAML::Node& node) {
|
||||
|
||||
@@ -38,6 +38,7 @@ struct MaConfig {
|
||||
float m_min_luminance_ev;
|
||||
float m_max_luminance_ev;
|
||||
} m_lighting;
|
||||
int m_envmap_resolution;
|
||||
float m_weight_lines;
|
||||
float m_weight_tractions;
|
||||
struct MaConfigShadow {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <fmt/format.h>
|
||||
#include <nvrhi/utils.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "gbuffer.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
@@ -234,14 +235,14 @@ void MaEnvironment::Init(const std::string& texture, float pre_exposure) {
|
||||
.addBindingLayout(m_bl_integrate_brdf)
|
||||
.setComputeShader(m_cs_integrate_brdf));
|
||||
|
||||
int skybox_width = 2048;
|
||||
int dynamic_skybox_width = 512;
|
||||
int skybox_width = NvRenderer::Config()->m_envmap_resolution;
|
||||
int dynamic_skybox_width = NvRenderer::Config()->m_envmap_resolution;
|
||||
int skybox_mips = static_cast<int>(floor(log2(skybox_width))) + 1;
|
||||
int dynamic_skybox_mips =
|
||||
static_cast<int>(floor(log2(dynamic_skybox_width))) + 1;
|
||||
int diffuse_width = 64;
|
||||
int specular_width = 1024;
|
||||
int dynamic_specular_width = 256;
|
||||
int specular_width = NvRenderer::Config()->m_envmap_resolution;
|
||||
int dynamic_specular_width = NvRenderer::Config()->m_envmap_resolution;
|
||||
int specular_mips = 6;
|
||||
|
||||
m_skybox = m_backend->GetDevice()->createTexture(
|
||||
|
||||
Reference in New Issue
Block a user