diff --git a/Assets/Shaders/LandAndOcean.hlsl b/Assets/Shaders/LandAndOcean.hlsl index dd78efc..1f6a109 100644 --- a/Assets/Shaders/LandAndOcean.hlsl +++ b/Assets/Shaders/LandAndOcean.hlsl @@ -133,10 +133,16 @@ float4 PSMain(PSInput input) : SV_TARGET litColor = lerp(litColor, FogColor, fogAmount); #endif - // Common convention to take alpha from diffuse material. litColor.a = diffuseAlbedo.a; + +#ifdef NO_ALPHA + // Common convention to take alpha from diffuse material. + litColor = float4(1.0f, 0.0f, 0.0f, 1.0f); + litColor.a = 1.0f; +#endif // litColor = float4(fogAmount, fogAmount, fogAmount, 1.0); // litColor = FogColor; + // litColor = float4(litColor.a, litColor.a, litColor.a, 1.0f); return litColor; } \ No newline at end of file diff --git a/Assets/Textures/Mirror.jpg b/Assets/Textures/Mirror.jpg new file mode 100644 index 0000000..153fb34 Binary files /dev/null and b/Assets/Textures/Mirror.jpg differ diff --git a/Src/7.D3DAppGLFW.cpp b/Src/7.D3DAppGLFW.cpp index 464c19b..0a7abca 100644 Binary files a/Src/7.D3DAppGLFW.cpp and b/Src/7.D3DAppGLFW.cpp differ diff --git a/Src/7.D3DAppGLFW.h b/Src/7.D3DAppGLFW.h index 4995e2b..b6e3a9d 100644 --- a/Src/7.D3DAppGLFW.h +++ b/Src/7.D3DAppGLFW.h @@ -86,8 +86,6 @@ class D3DApp int32_t run(); - void renderImGui(); - private: bool initGLFW(); bool initWindow(HINSTANCE hInstance, int32_t cmdShow); @@ -274,6 +272,8 @@ class D3DApp void processInput(float deltaTime); void render(); + void renderScene(); + void present(); void executeCommandLists(); @@ -310,6 +310,8 @@ class D3DApp void preprareResize(); void onResize(); void onRenderTextureResize(uint32_t width, uint32_t height); + + void disableAlphaBlend(); private: const static uint32_t FrameBackbufferCount = 3; int32_t windowWidth = 1280; @@ -387,8 +389,8 @@ class D3DApp ComPtr swapChain1; // DXR stuff - ComPtr swapChain; - //ComPtr swapChain; + //ComPtr swapChain; + ComPtr swapChain; ComPtr renderTargetViewDescriptorHeap; ComPtr renderTextureRTVDescriptorHeap; ComPtr shaderResourceViewDescriptorHeap; @@ -455,7 +457,7 @@ class D3DApp // Our state bool showDemoWindow = true; bool showAnotherWindow = false; - ImVec4 clearColor = ImVec4(0.4f, 0.6f, 0.9f, 1.00f); + ImVec4 clearColor = ImVec4(0.4f, 0.6f, 0.9f, 1.0f); static D3DApp* app; diff --git a/imgui.ini b/imgui.ini index b1bc59b..b776569 100644 --- a/imgui.ini +++ b/imgui.ini @@ -5,7 +5,7 @@ Collapsed=0 [Window][Dear ImGui Demo] Pos=934,0 -Size=346,341 +Size=346,357 Collapsed=0 DockId=0x00000005,0 @@ -15,8 +15,8 @@ Size=400,400 Collapsed=0 [Window][Hello, world!] -Pos=934,343 -Size=346,377 +Pos=934,359 +Size=346,361 Collapsed=0 DockId=0x00000006,0 @@ -37,9 +37,9 @@ DockSpace ID=0x29A038FF Window=0x4647B76E Pos=0,0 Size=1280,720 Split=X DockNode ID=0x00000001 Parent=0x29A038FF SizeRef=932,1080 Split=Y DockNode ID=0x00000003 Parent=0x00000001 SizeRef=1368,561 CentralNode=1 Selected=0x13926F0B DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1368,157 Selected=0xF780C014 - DockNode ID=0x00000002 Parent=0x29A038FF SizeRef=346,1080 Split=Y Selected=0xE87781F4 - DockNode ID=0x00000005 Parent=0x00000002 SizeRef=550,341 Selected=0xE87781F4 - DockNode ID=0x00000006 Parent=0x00000002 SizeRef=550,377 Selected=0xD00C9CD4 + DockNode ID=0x00000002 Parent=0x29A038FF SizeRef=346,1080 Split=Y Selected=0xD00C9CD4 + DockNode ID=0x00000005 Parent=0x00000002 SizeRef=346,357 Selected=0xE87781F4 + DockNode ID=0x00000006 Parent=0x00000002 SizeRef=346,361 Selected=0xD00C9CD4 [imgui-console][imgui-console] m_AutoScroll=1