WIP for Alpha, added material name in editor WIP for cutscene

This commit is contained in:
Glence 2023-02-27 18:09:05 +08:00
parent 75295b5d6e
commit 79cb0f12ae
69 changed files with 300 additions and 60 deletions

View File

@ -1,4 +0,0 @@
Start Maximized: true
Working Scene ID: 86098106
Window Size: {x: 1920, y: 1013}
Style: 0

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI Translucent
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 65439157
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_01a
ID: 120028153
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI Translucent
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54232941
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_01b
ID: 130271494
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI Translucent
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61642935
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_01c
ID: 118957569
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 56583306
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_02a
ID: 120947645
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 65259204
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_02b
ID: 129923341
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 66222856
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_02c
ID: 133191310
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 58931679
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_03a
ID: 129620984
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 56330596
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_03b
ID: 119078830
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 66929828
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_03c
ID: 133041695
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 66009942
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_03d
ID: 117751129
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61803402
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_03e
ID: 131504451
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 66775153
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_bg
ID: 117531460
Type: 7

View File

@ -1,7 +1,7 @@
- EID: 1 - EID: 1
Name: Canvas Name: Canvas
IsActive: true IsActive: true
NumberOfChildren: 1 NumberOfChildren: 3
Components: Components:
Canvas Component: Canvas Component:
Canvas Width: 1920 Canvas Width: 1920
@ -28,11 +28,11 @@
Transform Component: Transform Component:
Translate: {x: -500, y: -1000, z: 0.5} Translate: {x: -500, y: -1000, z: 0.5}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 500, y: 1080, z: 1} Scale: {x: 675, y: 1009, z: 1}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 141771688 Mesh: 141771688
Material: 121834459 Material: 120028153
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 1 Canvas ID: 1
@ -46,13 +46,13 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 1000, z: 0.5} Translate: {x: 0, y: 1000, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 500, y: 1080, z: 1} Scale: {x: 1000, y: 1032, z: 1}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 141771688 Mesh: 141771688
Material: 123313564 Material: 130271494
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 1 Canvas ID: 1
@ -66,13 +66,53 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 500, y: -1000, z: 0.5} Translate: {x: 500, y: -1000, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 500, y: 1080, z: 1} Scale: {x: 756, y: 984, z: 1}
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 141771688 Mesh: 141771688
Material: 129138332 Material: 118957569
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 11
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 12
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 1 Canvas ID: 1
@ -126,7 +166,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: -500, y: 0, z: 0} Translate: {x: -550, y: 0, z: 0.5}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
@ -137,7 +177,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: 0} Translate: {x: 0, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
@ -148,7 +188,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 500, y: 0, z: 0} Translate: {x: 550, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true

View File

@ -9,20 +9,21 @@ public class Cutscene : Script
public float duration = 3.0f; public float duration = 3.0f;
private Renderable pic1Renderable; private Renderable pic1aRenderable;
private Renderable pic2Renderable; private Renderable pic1bRenderable;
private Renderable pic3Renderable; private Renderable pic1cRenderable;
private Transform pic1Tran; private Transform pic1aTran;
private Transform pic2Tran; private Transform pic1bTran;
private Transform pic3Tran; private Transform pic1cTran;
private float alphaIn = 0.0f; private float alphaIn = 0.0f;
//private float alphaOut = 1.0f; //private float alphaOut = 1.0f;
private float time = 0.0f; private float time = 0.0f;
private bool showPic1 = true; private bool showPic1a = true;
private bool showPic2 = false; private bool showPic1b = false;
private bool showPic3 = false; private bool showPic1c = false;
private bool cutsceneDone = false;
public float slideSpeed = 5.0f; public float slideSpeed = 5.0f;
public GameObject cutscene1Points; public GameObject cutscene1Points;
@ -43,27 +44,27 @@ public class Cutscene : Script
if (listOfCutscene1Pics[0]) if (listOfCutscene1Pics[0])
{ {
pic1Renderable = listOfCutscene1Pics[0].GetComponent<Renderable>(); pic1aRenderable = listOfCutscene1Pics[0].GetComponent<Renderable>();
pic1Tran = listOfCutscene1Pics[0].GetComponent<Transform>(); pic1aTran = listOfCutscene1Pics[0].GetComponent<Transform>();
pic1Renderable.Material.SetProperty<float>("data.alpha" , 0.0f); pic1aRenderable.Material.SetProperty<float>("data.alpha" , 0.0f);
} }
else else
Debug.LogError("PIC1 MISSING"); Debug.LogError("PIC1 MISSING");
if (listOfCutscene1Pics[1]) if (listOfCutscene1Pics[1])
{ {
pic2Renderable = listOfCutscene1Pics[1].GetComponent<Renderable>(); pic1bRenderable = listOfCutscene1Pics[1].GetComponent<Renderable>();
pic2Tran = listOfCutscene1Pics[1].GetComponent<Transform>(); pic1bTran = listOfCutscene1Pics[1].GetComponent<Transform>();
pic2Renderable.Material.SetProperty<float>("data.alpha", 0.0f); pic1bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
} }
else else
Debug.LogError("PIC2 MISSING"); Debug.LogError("PIC2 MISSING");
if (listOfCutscene1Pics[2]) if (listOfCutscene1Pics[2])
{ {
pic3Renderable = listOfCutscene1Pics[2].GetComponent<Renderable>(); pic1cRenderable = listOfCutscene1Pics[2].GetComponent<Renderable>();
pic3Tran = listOfCutscene1Pics[2].GetComponent<Transform>(); pic1cTran = listOfCutscene1Pics[2].GetComponent<Transform>();
pic3Renderable.Material.SetProperty<float>("data.alpha", 0.0f); pic1cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
} }
else else
Debug.LogError("PIC3 MISSING"); Debug.LogError("PIC3 MISSING");
@ -73,63 +74,73 @@ public class Cutscene : Script
protected override void update() protected override void update()
{ {
if (showPic1) if (showPic1a)
{ {
pic1Tran.LocalPosition = Vector3.Lerp(pic1Tran.LocalPosition, listOfCutscene1Points[0].LocalPosition, slideSpeed * Time.DeltaTimeF); pic1aTran.LocalPosition = Vector3.Lerp(pic1aTran.LocalPosition, listOfCutscene1Points[0].LocalPosition, slideSpeed * Time.DeltaTimeF);
if (time < duration) if (time < duration)
{ {
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration); alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF; time += Time.DeltaTimeF;
} }
else else
{
pic1aTran.LocalPosition = listOfCutscene1Points[0].LocalPosition;
alphaIn = 1.0f; alphaIn = 1.0f;
}
pic1Renderable.Material.SetProperty<float>("data.alpha", alphaIn); pic1aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f) if (alphaIn >= 1.0f)
{ {
showPic1 = false; showPic1a = false;
showPic2 = true; showPic1b = true;
time = 0; time = 0;
alphaIn = 0; alphaIn = 0;
} }
} }
if (showPic2) if (showPic1b)
{ {
pic2Tran.LocalPosition = Vector3.Lerp(pic2Tran.LocalPosition, listOfCutscene1Points[1].LocalPosition, slideSpeed * Time.DeltaTimeF); pic1bTran.LocalPosition = Vector3.Lerp(pic1bTran.LocalPosition, listOfCutscene1Points[1].LocalPosition, slideSpeed * Time.DeltaTimeF);
if (time < duration) if (time < duration)
{ {
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration); alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF; time += Time.DeltaTimeF;
} }
else else
{
pic1bTran.LocalPosition = listOfCutscene1Points[1].LocalPosition;
alphaIn = 1.0f; alphaIn = 1.0f;
}
pic2Renderable.Material.SetProperty<float>("data.alpha", alphaIn); pic1bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f) if (alphaIn >= 1.0f)
{ {
showPic2 = false; showPic1b = false;
showPic3 = true; showPic1c = true;
time = 0; time = 0;
alphaIn = 0; alphaIn = 0;
} }
} }
if (showPic3) if (showPic1c)
{ {
pic3Tran.LocalPosition = Vector3.Lerp(pic3Tran.LocalPosition, listOfCutscene1Points[2].LocalPosition, slideSpeed * Time.DeltaTimeF); pic1cTran.LocalPosition = Vector3.Lerp(pic1cTran.LocalPosition, listOfCutscene1Points[2].LocalPosition, slideSpeed * Time.DeltaTimeF);
if (time < duration) if (time < duration)
{ {
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration); alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF; time += Time.DeltaTimeF;
} }
else else
{
pic1cTran.LocalPosition = listOfCutscene1Points[2].LocalPosition;
alphaIn = 1.0f; alphaIn = 1.0f;
}
pic3Renderable.Material.SetProperty<float>("data.alpha", alphaIn); pic1cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f) if (alphaIn >= 1.0f)
{ {
showPic3 = false; showPic1c = false;
cutsceneDone = true;
time = 0; time = 0;
alphaIn = 0; alphaIn = 0;
} }

View File

@ -9,10 +9,6 @@ public class MainMenu : Script
public GameObject obj; public GameObject obj;
private Renderable renderable; private Renderable renderable;
//tbr
public GameObject test;
public Renderable testRenderable;
protected override void awake() protected override void awake()
{ {
AudioHandler.audioClipHandlers["BGMMainMenu"] = Audio.CreateAudioClip("event:/Music/main_menu"); AudioHandler.audioClipHandlers["BGMMainMenu"] = Audio.CreateAudioClip("event:/Music/main_menu");
@ -23,8 +19,6 @@ public class MainMenu : Script
renderable = obj.GetComponent<Renderable>(); renderable = obj.GetComponent<Renderable>();
//tbr
testRenderable = test.GetComponent<Renderable>();
} }
protected override void start() protected override void start()
@ -32,7 +26,7 @@ public class MainMenu : Script
} }
protected override void update() protected override void update()
{ {
if (Input.GetKeyDown(Input.KeyCode.K) && obj) /* if (Input.GetKeyDown(Input.KeyCode.K) && obj)
{ {
if (testRenderable.Material.GetProperty<float>("data.alpha") == 1) if (testRenderable.Material.GetProperty<float>("data.alpha") == 1)
{ {
@ -42,7 +36,7 @@ public class MainMenu : Script
{ {
testRenderable.Material.SetProperty<float>("data.alpha", 1); testRenderable.Material.SetProperty<float>("data.alpha", 1);
} }
} }*/
if (Input.GetKeyDown(Input.KeyCode.Space)) if (Input.GetKeyDown(Input.KeyCode.Space))
{ {

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_01a
ID: 65439157
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_01b
ID: 54232941
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_01c
ID: 61642935
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_02a
ID: 56583306
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_02b
ID: 65259204
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_02c
ID: 66222856
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_03a
ID: 58931679
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_03b
ID: 56330596
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_03c
ID: 66929828
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_03d
ID: 66009942
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_03e
ID: 61803402
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_bg
ID: 66775153
Type: 3

View File

@ -131,7 +131,20 @@ namespace SHADE
bool isOpen = false; bool isOpen = false;
if(filter.empty()) if(filter.empty())
isOpen = ImGui::TreeNodeEx(folder, flags, "%s %s", ICON_MD_FOLDER, folder->name.data()); isOpen = ImGui::TreeNodeEx(folder, flags, "%s %s", ICON_MD_FOLDER, folder->name.data());
if (ImGui::BeginPopupContextItem())
{
if (ImGui::Selectable("Compile All"))
{
for (auto& file : files)
{
if (file.compilable)
SHAssetManager::CompileAsset(file.path, !file.compiled);
}
QueueRefresh();
}
ImGui::EndPopup();
}
const ImRect nodeRect = ImRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax()); const ImRect nodeRect = ImRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax());
//if (ImGui::BeginPopupContextItem()) //if (ImGui::BeginPopupContextItem())

View File

@ -34,6 +34,7 @@ namespace SHADE
currentMatSpec = SHResourceManager::LoadOrGet<SHMaterialSpec>(assetId); currentMatSpec = SHResourceManager::LoadOrGet<SHMaterialSpec>(assetId);
currentMaterial = SHResourceManager::LoadOrGet<SHMaterial>(assetId); currentMaterial = SHResourceManager::LoadOrGet<SHMaterial>(assetId);
materialName = SHAssetManager::GetAsset(assetId)->name;
} }
void SHMaterialInspector::Init() void SHMaterialInspector::Init()
@ -169,6 +170,12 @@ namespace SHADE
} }
} }
ImGui::EndDisabled(); ImGui::EndDisabled();
if (currentViewedMaterial)
{
ImGui::Text(materialName.data());
}
ImGui::EndMenuBar(); ImGui::EndMenuBar();
} }
} }

View File

@ -26,6 +26,7 @@ namespace SHADE
bool isDirty; bool isDirty;
bool isNewMaterial; bool isNewMaterial;
AssetID currentViewedMaterial; AssetID currentViewedMaterial;
std::string materialName{};
Handle<SHMaterialSpec> currentMatSpec; Handle<SHMaterialSpec> currentMatSpec;
Handle<SHMaterial> currentMaterial; Handle<SHMaterial> currentMaterial;
Handle<SHVkShaderModule> vertShaderHandle, fragShaderHandle; Handle<SHVkShaderModule> vertShaderHandle, fragShaderHandle;

View File

@ -128,6 +128,7 @@ namespace SHADE
static constexpr std::string_view GBUFFER_WRITE_SUBPASS = "G-Buffer Write"; static constexpr std::string_view GBUFFER_WRITE_SUBPASS = "G-Buffer Write";
static constexpr std::string_view UI_SUBPASS = "UI"; static constexpr std::string_view UI_SUBPASS = "UI";
static constexpr std::string_view UI_TRANSLUCENT_SUBPASS = "UI Translucent";
static constexpr std::string_view VFX_SUBPASS = "VFX"; static constexpr std::string_view VFX_SUBPASS = "VFX";
static constexpr std::string_view OBJ_VFX_SUBPASS = "Object VFX Subpass No Depth"; static constexpr std::string_view OBJ_VFX_SUBPASS = "Object VFX Subpass No Depth";
@ -135,6 +136,7 @@ namespace SHADE
{ {
GBUFFER_WRITE_SUBPASS, GBUFFER_WRITE_SUBPASS,
UI_SUBPASS, UI_SUBPASS,
UI_TRANSLUCENT_SUBPASS,
OBJ_VFX_SUBPASS OBJ_VFX_SUBPASS
}; };
}; };

View File

@ -361,12 +361,20 @@ namespace SHADE
uiSubpass->AddColorOutput("Scene"); uiSubpass->AddColorOutput("Scene");
uiSubpass->AddColorOutput("Entity ID"); uiSubpass->AddColorOutput("Entity ID");
uiSubpass->AddDepthOutput("Depth Buffer"); uiSubpass->AddDepthOutput("Depth Buffer");
uiSubpass->AddExteriorDrawCalls([=](Handle<SHVkCommandBuffer> cmdBuffer, Handle<SHRenderer> renderer, uint32_t frameIndex)
usableSubpassesMapping.emplace(SHGraphicsConstants::RenderGraphEntityNames::UI_SUBPASS.data(), uiSubpass);
auto uiTranslucentSubpass = screenSpaceNode->AddSubpass(SHGraphicsConstants::RenderGraphEntityNames::UI_TRANSLUCENT_SUBPASS.data(), worldViewport, screenRenderer);
uiTranslucentSubpass->AddColorOutput("Scene");
uiTranslucentSubpass->AddColorOutput("Entity ID");
uiTranslucentSubpass->AddDepthOutput("Depth Buffer");
uiTranslucentSubpass->AddExteriorDrawCalls([=](Handle<SHVkCommandBuffer> cmdBuffer, Handle<SHRenderer> renderer, uint32_t frameIndex)
{ {
textRenderingSubSystem->Render(cmdBuffer, renderer, frameIndex); textRenderingSubSystem->Render(cmdBuffer, renderer, frameIndex);
}); });
usableSubpassesMapping.emplace(SHGraphicsConstants::RenderGraphEntityNames::UI_SUBPASS.data(), uiSubpass); usableSubpassesMapping.emplace(SHGraphicsConstants::RenderGraphEntityNames::UI_TRANSLUCENT_SUBPASS.data(), uiTranslucentSubpass);
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
/* RENDER TO SWAPCHAIN IMAGE FOR PRESENT PASS */ /* RENDER TO SWAPCHAIN IMAGE FOR PRESENT PASS */
@ -461,7 +469,7 @@ namespace SHADE
// initialize the text renderer // initialize the text renderer
auto uiNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::SCREEN_SPACE_PASS.data()); auto uiNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::SCREEN_SPACE_PASS.data());
textRenderingSubSystem->Init(device, uiNode->GetRenderpass(), uiNode->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::UI_SUBPASS), descPool, textVS, textFS); textRenderingSubSystem->Init(device, uiNode->GetRenderpass(), uiNode->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::UI_TRANSLUCENT_SUBPASS), descPool, textVS, textFS);
trajectoryRenderingSubSystem = resourceManager.Create<SHTrajectoryRenderingSubSystem>(); trajectoryRenderingSubSystem = resourceManager.Create<SHTrajectoryRenderingSubSystem>();