From ece0a92717289469223ef94acc85d1942ab27c58 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Tue, 22 Nov 2022 11:29:01 +0800 Subject: [PATCH 1/6] Fixed TextRenderable components not being retrievable by C# scripts --- SHADE_Managed/src/Engine/ECS.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SHADE_Managed/src/Engine/ECS.cxx b/SHADE_Managed/src/Engine/ECS.cxx index ffdffd12..c388f0cd 100644 --- a/SHADE_Managed/src/Engine/ECS.cxx +++ b/SHADE_Managed/src/Engine/ECS.cxx @@ -28,6 +28,7 @@ of DigiPen Institute of Technology is prohibited. #include "Scene/SHSceneGraph.h" #include "Tools/Logger/SHLog.h" #include "Graphics\MiddleEnd\Interface\SHRenderable.h" +#include "Graphics\MiddleEnd\TextRendering\SHTextRenderableComponent.h" // Project Headers #include "Utility/Convert.hxx" #include "Utility/Debug.hxx" @@ -38,6 +39,7 @@ of DigiPen Institute of Technology is prohibited. #include "Components/CameraArm.hxx" #include "Components/Light.hxx" #include "Components\Renderable.hxx" +#include "Components\TextRenderable.hxx" namespace SHADE { @@ -321,6 +323,7 @@ namespace SHADE componentMap.Add(createComponentSet()); componentMap.Add(createComponentSet()); componentMap.Add(createComponentSet()); + componentMap.Add(createComponentSet()); } /*---------------------------------------------------------------------------------*/ -- 2.40.1 From 858e200fb3b5f80333c7daa5045ae84856545c16 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Tue, 22 Nov 2022 11:32:19 +0800 Subject: [PATCH 2/6] Bug fixes --- Assets/CollisionTags.SHConfig | 36 +++++++++---------- SHADE_Engine/src/Camera/SHCameraDirector.cpp | 2 ++ .../src/ECS_Base/Managers/SHEntityManager.cpp | 2 +- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Assets/CollisionTags.SHConfig b/Assets/CollisionTags.SHConfig index 18a339dd..d3ebe7e2 100644 --- a/Assets/CollisionTags.SHConfig +++ b/Assets/CollisionTags.SHConfig @@ -1,20 +1,16 @@ -0 1 -1 2 -2 3 -3 4 -4 5 -5 6 -6 7 -7 8 -8 9 -9 10 -10 11 -11 12 -12 13 -13 14 -14 15 -15 16 - -note: -All collision tags should follow the above format "indextag name". -If it fails to follow this, the default tag names will be used. \ No newline at end of file +0 1 +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +10 11 +11 12 +12 13 +13 14 +14 15 +15 16 diff --git a/SHADE_Engine/src/Camera/SHCameraDirector.cpp b/SHADE_Engine/src/Camera/SHCameraDirector.cpp index ec539fa1..29e2dcde 100644 --- a/SHADE_Engine/src/Camera/SHCameraDirector.cpp +++ b/SHADE_Engine/src/Camera/SHCameraDirector.cpp @@ -43,7 +43,9 @@ namespace SHADE if (!camComponent) { SHLOG_WARNING("Camera Director warning: Entity does not have a camera"); + return nullptr; } + return camComponent; } diff --git a/SHADE_Engine/src/ECS_Base/Managers/SHEntityManager.cpp b/SHADE_Engine/src/ECS_Base/Managers/SHEntityManager.cpp index 19eb5168..1c603c57 100644 --- a/SHADE_Engine/src/ECS_Base/Managers/SHEntityManager.cpp +++ b/SHADE_Engine/src/ECS_Base/Managers/SHEntityManager.cpp @@ -146,7 +146,7 @@ namespace SHADE //Call all the children to Destroy themselves first before the parent is destroyed. if (entityVec[eIndex]) { - auto& children = SHSceneManager::GetCurrentSceneGraph().GetChildren(eID); + auto children = SHSceneManager::GetCurrentSceneGraph().GetChildren(eID); for (auto& child : children) { DestroyEntity(child->GetEntityID()); -- 2.40.1 From fcf258d77379c7579f389fabcbef9f6e52cc4959 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Tue, 22 Nov 2022 14:11:10 +0800 Subject: [PATCH 3/6] Added SceneManager managed code --- SHADE_Managed/src/Scene/SceneManager.cxx | 25 +++++++++++++++++++++++ SHADE_Managed/src/Scene/SceneManager.hxx | 26 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 SHADE_Managed/src/Scene/SceneManager.cxx create mode 100644 SHADE_Managed/src/Scene/SceneManager.hxx diff --git a/SHADE_Managed/src/Scene/SceneManager.cxx b/SHADE_Managed/src/Scene/SceneManager.cxx new file mode 100644 index 00000000..179a8b2f --- /dev/null +++ b/SHADE_Managed/src/Scene/SceneManager.cxx @@ -0,0 +1,25 @@ +/************************************************************************************//*! +\file Input.hxx +\author Daniel Chua +\par email: yeechendaniel.chua@digipen.edu +\date Oct 16, 2022 +\brief Contains the definition of the managed SceneManager static class. + + Note: This file is written in C++17/CLI. + +Copyright (C) 2022 DigiPen Institute of Technology. +Reproduction or disclosure of this file or its contents without the prior written consent +of DigiPen Institute of Technology is prohibited. +*//*************************************************************************************/ + + +#include "SceneManager.hxx" +#include "Scene/SHSceneManager.h" + +namespace SHADE +{ + void SceneManager::ChangeScene(AssetID sceneAssetID) + { + SHSceneManager::RestartScene(sceneAssetID); + } +} \ No newline at end of file diff --git a/SHADE_Managed/src/Scene/SceneManager.hxx b/SHADE_Managed/src/Scene/SceneManager.hxx new file mode 100644 index 00000000..e1b30bc3 --- /dev/null +++ b/SHADE_Managed/src/Scene/SceneManager.hxx @@ -0,0 +1,26 @@ +/************************************************************************************//*! +\file Input.hxx +\author Daniel Chua +\par email: yeechendaniel.chua@digipen.edu +\date Oct 16, 2022 +\brief Contains the definition of the managed SceneManager static class. + + Note: This file is written in C++17/CLI. + +Copyright (C) 2022 DigiPen Institute of Technology. +Reproduction or disclosure of this file or its contents without the prior written consent +of DigiPen Institute of Technology is prohibited. +*//*************************************************************************************/ + + +#pragma once + +#include "Assets/SHAssetMacros.h" + +namespace SHADE +{ + public ref class SceneManager abstract sealed + { + static void ChangeScene(AssetID sceneAssetID); + }; +} -- 2.40.1 From 3f39cfc6379fb15064a95f3a17e869b98c963384 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Tue, 22 Nov 2022 14:14:58 +0800 Subject: [PATCH 4/6] include pch --- SHADE_Managed/src/Scene/SceneManager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SHADE_Managed/src/Scene/SceneManager.cxx b/SHADE_Managed/src/Scene/SceneManager.cxx index 179a8b2f..1e139a95 100644 --- a/SHADE_Managed/src/Scene/SceneManager.cxx +++ b/SHADE_Managed/src/Scene/SceneManager.cxx @@ -12,7 +12,7 @@ Reproduction or disclosure of this file or its contents without the prior writte of DigiPen Institute of Technology is prohibited. *//*************************************************************************************/ - +#include "SHpch.h" #include "SceneManager.hxx" #include "Scene/SHSceneManager.h" -- 2.40.1 From 681e7f3506664d3f298f2e7e1887b6dc5150e9a9 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Tue, 22 Nov 2022 14:26:10 +0800 Subject: [PATCH 5/6] Added invalid Asset ID Macro --- SHADE_Engine/src/Assets/SHAssetMacros.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SHADE_Engine/src/Assets/SHAssetMacros.h b/SHADE_Engine/src/Assets/SHAssetMacros.h index 5ab1945d..566e34e2 100644 --- a/SHADE_Engine/src/Assets/SHAssetMacros.h +++ b/SHADE_Engine/src/Assets/SHAssetMacros.h @@ -40,6 +40,8 @@ typedef FMOD::Sound* SHSound; // Asset Meta Version constexpr std::string_view ASSET_META_VER { "1.0" }; +constexpr AssetID INVALID_ASSET_ID {0}; + // Asset type enum enum class AssetType : AssetTypeMeta { -- 2.40.1 From 780c71619930d3f1f16d033c60b423231f43b662 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Tue, 22 Nov 2022 16:00:05 +0800 Subject: [PATCH 6/6] Updated SSAO shader --- Assets/Shaders/SSAO_CS.glsl | 4 ++-- Assets/Shaders/SSAO_CS.shshaderb | Bin 6125 -> 6141 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Shaders/SSAO_CS.glsl b/Assets/Shaders/SSAO_CS.glsl index 1a572521..627c59d1 100644 --- a/Assets/Shaders/SSAO_CS.glsl +++ b/Assets/Shaders/SSAO_CS.glsl @@ -6,8 +6,8 @@ const int ROTATION_KERNEL_W = 4; const int ROTATION_KERNEL_H = 4; // can perhaps pass in as push constant. -const float RADIUS = 0.5f; -const float BIAS = 0.025f; +const float RADIUS = 0.2f; +const float BIAS = 0.0025f; layout(local_size_x = 16, local_size_y = 16) in; layout(set = 4, binding = 0, rgba32f) uniform image2D positions; diff --git a/Assets/Shaders/SSAO_CS.shshaderb b/Assets/Shaders/SSAO_CS.shshaderb index 69f7a44f1a9f7144e912c70a533a67027a7e737b..a9154e109ef6c77161a9f9c49ac85449c7894e54 100644 GIT binary patch delta 1476 zcmZ9L$xGEy7>3XFI%}XsMidydh$xB>B9M%tO{=nfU`5cPIom{VjR>MeE&3aRqD9%Y z*-D#7Y@W;}%SO{h&;UZub2}%ZBd_0k-fuYHch2t)&K#LpH|g8BP*~Zb$z>sALS+~g zhTH3=WXE1a-@JV7hBd1euG-MLI+XC&lV6(c&18o1GfMUr6*n|AH0|py>&hMZQ)Aw= zP)vako`K58lN;Ta!uvr6B>wJFnVn3f?;Ox?k<`?A`2W*)p&9G4DPy`o%ISv3 z=|giaUfBgilhX7Cso7~2_7a#F_jZ06SR^%mC2Hy}>#U2na22k91!tLi4OmY-m#*@9 zbfl~Fb5XMa-}DAh>!8S1?9Hex!hUDU+gR5x;`QAEYCm`!`A_VYxL1$2kqdX&OaQ)X zI_xf7J?-zoJ$y&Jt^06e)T{YuZSVnbYCn4YyJGA^_->%TI+Pb;AHj{C<@-B93oy|4 z>cJY24u1^y@brF9;M>5z4L@bCo*L|htNBasj5qciZY_NWW7B<{A9S<;8%c-0fZK>4 zpVPereLy|Myn?R>+hfdYxSFvJqEGGLtM>`aFU7tAxsCj5qkzKODE4D5pij*Lo3OrR zD>gOo4(=i8s^7!a20*%r5AYVCFEyoRjj9lqg^z4TMWGD)3Dm^BlYa&tvV@;#J@!k~ R)Du=x%sS@kAK`W9fZrH<$;JQx delta 1438 zcmZ9M$#0EO7{<@-pmU-`MMx^K5Fr{ni7CX!O4(URiZrpHEovi@+eReP1q*+Jgji6w z=AtzZRr6d_)l|jOkTmi8UFV4Sny2q`o_9F!d(QXWvAQpHHPeSDhx}7mFry@dOehak z;ag|T%)&_*(YLMJ+_I^0d1FiK#!$>(e{OZ*i%jNgZf^0uf+7Nz?C&k`)ZO!G}NwxGu-O10l36b6pJ^1>-@A{{pw#9I_{1zXD@Mb0eiwGu3uNb728NP1yci zP5H#K>`~|u&;jbnoPzC)Yc>si<{QPW=wKg<64 zqALkEpgS+>`19DzZl=qRsvO>dBz zomOBkfoXAV=a+#+QsY;mrtV{%rg#ch;riFJm$}z~_0+TJD6dCHI!a#`H5>3wZveF} zitNDNjM@t9cc$#a`urkZ-z}i_gUgZs#BPsk^>`ZDaEHZI;Jv2J?!wj6`X1cPcg54X z4>v}=l9$#79{{KJ6VSgW#y*610R5GrG#~p2ZtOho-w7Ikf!M7LQd4Tys0d+g_{gFv3MJT2V0>IV`3P{6dOp!w?B}SdCv2dYb