diff --git a/DataSpec/Blender/RetroMasterShader.py b/DataSpec/Blender/RetroMasterShader.py index 1be7e3e77..38e58299a 100644 --- a/DataSpec/Blender/RetroMasterShader.py +++ b/DataSpec/Blender/RetroMasterShader.py @@ -673,6 +673,7 @@ def make_pass_inca(): new_grp.links.new(grp_in.outputs[0], add1.inputs[1]) new_grp.links.new(grp_in.outputs[2], add1.inputs[2]) new_grp.links.new(add1.outputs[0], grp_out.inputs[0]) + new_grp.links.new(grp_in.outputs[1], grp_out.inputs[1]) grp_out.inputs[1].default_value = 1.0 # Reflection Map diff --git a/DataSpec/DNAMP3/CMDLMaterials.cpp b/DataSpec/DNAMP3/CMDLMaterials.cpp index acb3baba1..a4030d6bc 100644 --- a/DataSpec/DNAMP3/CMDLMaterials.cpp +++ b/DataSpec/DNAMP3/CMDLMaterials.cpp @@ -63,6 +63,9 @@ void MaterialSet::ConstructMaterial(Stream& out, material.header.flags.shadowOccluderMesh() ? "True" : "False"); + /* TODO: Some models enable both of these flags at once, why? + * And how do we handle this properly? + */ /* Blend factors */ if (material.header.flags.additiveBlending()) out << "new_material.game_settings.alpha_blend = 'ADD'\n" diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt index 4e8811d59..59258de9f 100644 --- a/Editor/CMakeLists.txt +++ b/Editor/CMakeLists.txt @@ -26,7 +26,8 @@ add_executable(urde WIN32 ResourceBrowser.hpp ResourceBrowser.cpp atdna_ResourceBrowser.cpp ModelViewer.hpp ModelViewer.cpp atdna_ModelViewer.cpp ProjectManager.hpp ProjectManager.cpp - ViewManager.hpp ViewManager.cpp) + ViewManager.hpp ViewManager.cpp + Camera.hpp Camera.cpp) target_link_libraries(urde UrdeLocales diff --git a/Editor/Camera.cpp b/Editor/Camera.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Editor/Camera.hpp b/Editor/Camera.hpp new file mode 100644 index 000000000..ef710ec46 --- /dev/null +++ b/Editor/Camera.hpp @@ -0,0 +1,36 @@ +#ifndef URDE_CAMERA_HPP +#define URDE_CAMERA_HPP +#include +#include +#include +#include +#include + +namespace URDE +{ +class Camera +{ + Zeus::CFrustum m_frustum; + Zeus::CProjection m_projection; + Zeus::CVector3f m_position; + Zeus::CQuaternion m_orientation; +public: + + Camera(const Zeus::CVector3f& position, Zeus::EProjType projType=Zeus::EProjType::Perspective, + const Zeus::CVector3f& up=Zeus::Math::kUpVec) + : m_position(position) + { + } + + const Zeus::CMatrix4f& projectionMatrix() const { return m_projection.getCachedMatrix(); } + const Zeus::CProjection& projection() const { return m_projection; } + + virtual void think() + { + + } +}; +} + + +#endif // URDE_CAMERA_HPP diff --git a/Editor/ModelViewer.hpp b/Editor/ModelViewer.hpp index 103586b82..82406e01e 100644 --- a/Editor/ModelViewer.hpp +++ b/Editor/ModelViewer.hpp @@ -21,15 +21,17 @@ class ModelViewer : public Space }; Value renderMode = Mode::Material; - Value cameraPosition; + Value cameraPosition; + Value cameraOrientation; + } m_state; const Space::State& spaceState() const { return m_state; } struct View : Specter::View { - Zeus::CProjection m_cameraProjection; }; + virtual Specter::View* buildContentView(Specter::ViewResources& res) { return nullptr; diff --git a/libSpecter b/libSpecter index c5dd30dd7..5e2800b1b 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit c5dd30dd7d072666956050b5d5bfa4c325d18f56 +Subproject commit 5e2800b1bd316b6859c5b913b8e228f2c135424a