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