From 14d0b48bdf219419f6d72e6d43aee7bd80a32fdd Mon Sep 17 00:00:00 2001 From: Princerin Date: Tue, 28 Feb 2023 16:32:12 +0800 Subject: [PATCH] Fixed Imgui::Image() alpha blend issue(According to https://github.com/ocornut/imgui/pull/3447). --- Assets/Shaders/LandAndOcean.hlsl | 8 +++++++- Assets/Textures/Mirror.jpg | Bin 0 -> 20597 bytes Src/7.D3DAppGLFW.cpp | Bin 275144 -> 277928 bytes Src/7.D3DAppGLFW.h | 12 +++++++----- imgui.ini | 12 ++++++------ 5 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 Assets/Textures/Mirror.jpg 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 0000000000000000000000000000000000000000..153fb346ab6cb2ac48ca240296f02e1e5af1c508 GIT binary patch literal 20597 zcmbTd2|SeV+ctg=iX>7Lp(&I-ku7AVuYF$ziAswsQ%H7URNqQd$d)Z;?1m=Eo@FXA zA^RYN&=6uW)?sG6m*4Mw{?GD0zvuIR-{Jl=-DB?iI_PVf!}e*W>=9)a{B4j63b_kX`QcX95# zc5`uY?&99f&AoH*?Ag1AhliJko11qZFYjJH@Z#RXFR+h~f9L(qMRvZv^DXep$HUFD z^B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AvsMe|EBc48aJAoUkf#?PrP!Chg?^fZde{-?N_6=R7vv7l~J1 zZmwi3+{qGZ@5`epdl$3S$>l2YU4hDR%?OFtp#4d%@~c^1ICxs9GQ&MJKgOqCv#xB( z;<1JAhlTX(53oy0zv((>MCxRgV&?$=2eUjMj-}=EfnkqZP}1-dZ0*xSQLU9>Wu*{mabINNiQpx7HPw39aktwa}6Rj9sLnBIIi7u zmSy08Tk$VtDaf=1tTl4S1oMq#=!XU2g4R+(9~dPN^ZNL{NR#nsQaLGeNHxN{opU4H z<41FRj_=T)H+TfkbmvJ!>rLKBsjtyDBQ8PuJH+DX_yA`qtB;cw-NFZ#H++~(t=yR} zOuZoeSa(jCq*>^Q*g2%?@GUQJ|2TwVB9r5-WQqV^?rugUd|Ly91F&BBk3Vdn;ugHJ F>>sN{vt0lH 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