mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
squash commits from internal:
use gfx queue when loading dynamic textures fix possible timeout in light culling exclude lods & transparencies from lod test add cpu-side submodel structure for ray testing
This commit is contained in:
@@ -25,12 +25,15 @@
|
||||
#include <Classes.h>
|
||||
#include <scene.h>
|
||||
|
||||
#include "nvrenderer_enums.h"
|
||||
#include "quadtree.h"
|
||||
#include "renderer.h"
|
||||
#include "nvrenderer_enums.h"
|
||||
#include "resource_registry.h"
|
||||
#include "sky.h"
|
||||
|
||||
namespace Rt {
|
||||
struct IRtModel;
|
||||
}
|
||||
template <typename Renderer>
|
||||
struct MaRendererConstants {
|
||||
static constexpr size_t NumMaterialPasses() noexcept {
|
||||
@@ -188,6 +191,9 @@ class NvRenderer : public gfx_renderer, public MaResourceRegistry {
|
||||
std::shared_ptr<struct Sky> m_sky;
|
||||
std::shared_ptr<struct MaAutoExposure> m_auto_exposure;
|
||||
|
||||
std::unordered_map<TModel3d const *, std::shared_ptr<Rt::IRtModel>> rt_models;
|
||||
std::shared_ptr<Rt::IRtModel> GetRtModel(TModel3d const *);
|
||||
|
||||
std::shared_ptr<struct MaConfig> m_config;
|
||||
struct MaConfig *GetConfig() const { return m_config.get(); }
|
||||
static struct MaConfig *Config();
|
||||
@@ -213,6 +219,10 @@ class NvRenderer : public gfx_renderer, public MaResourceRegistry {
|
||||
glm::dvec3 m_previous_env_position;
|
||||
uint64_t m_previous_env_frame;
|
||||
|
||||
glm::dvec3 m_mouse_ro;
|
||||
glm::dvec3 m_mouse_rd;
|
||||
TSubModel const *m_picked_submodel = nullptr;
|
||||
|
||||
using section_sequence = std::vector<scene::basic_section *>;
|
||||
using distancecell_pair = std::pair<double, scene::basic_cell *>;
|
||||
using cell_sequence = std::vector<distancecell_pair>;
|
||||
|
||||
@@ -14,18 +14,16 @@ struct MaResourceMapping {
|
||||
entt::hashed_string m_key;
|
||||
nvrhi::ResourceType m_type;
|
||||
|
||||
#define MA_RESOURCE_MAPPING_INITIALIZER(type) \
|
||||
template <typename KeyType> \
|
||||
static MaResourceMapping type(int slot, const KeyType& key) { \
|
||||
MaResourceMapping mapping{}; \
|
||||
mapping.m_slot = slot; \
|
||||
mapping.m_key = static_cast<entt::hashed_string>(key); \
|
||||
mapping.m_type = nvrhi::ResourceType::type; \
|
||||
return mapping; \
|
||||
#define MA_RESOURCE_MAPPING_INITIALIZER(type) \
|
||||
static MaResourceMapping type(int slot, const char* key) { \
|
||||
MaResourceMapping mapping{}; \
|
||||
mapping.m_slot = slot; \
|
||||
mapping.m_key = static_cast<entt::hashed_string>(key); \
|
||||
mapping.m_type = nvrhi::ResourceType::type; \
|
||||
return mapping; \
|
||||
}
|
||||
|
||||
template <typename KeyType>
|
||||
static MaResourceMapping Texture_SRV(int slot, const KeyType& key) {
|
||||
static MaResourceMapping Texture_SRV(int slot, const char* key) {
|
||||
MaResourceMapping mapping{};
|
||||
mapping.m_slot = slot;
|
||||
mapping.m_key = static_cast<entt::hashed_string>(key);
|
||||
|
||||
Reference in New Issue
Block a user