From a980ac50683d347e53039a9d01053ba44c864729 Mon Sep 17 00:00:00 2001 From: Benualdo Date: Sun, 3 Nov 2024 12:09:16 +0100 Subject: [PATCH] Cook-Torrance split-sum BRDF lookup texture --- data/Engine/BRDF/CookTorrance.png | Bin 0 -> 14940 bytes data/Scenes/Aiguelongue.scene | 6 +-- data/Shaders/background/background.hlsl | 13 +++++- data/Shaders/lighting/deferredLighting.hlsl | 13 ++++-- data/Shaders/system/bindless.hlsli | 7 +++- data/Shaders/system/displaymodes.hlsli | 5 ++- data/Shaders/system/environment.hlsli | 26 ++++++++++++ data/Shaders/system/lighting.hlsli | 33 +++++++++------- data/Shaders/system/table.hlsli | 1 + data/Shaders/system/view.hlsli | 7 +++- data/Textures/EnvMaps/Default.psd | Bin 107186 -> 37282 bytes .../Resource/Texture/TextureResourceMeta.hpp | 2 +- src/gfx/Device/Device.cpp | 37 ++++++++++-------- src/gfx/Device/Device.h | 2 +- src/gfx/Importer/TextureImporter.hpp | 6 +-- src/gfx/Importer/TextureImporterSettings.h | 4 +- src/gfx/Shader/ShaderManager.hpp | 1 + src/gfx/Shader/dxc/ShaderCompiler_dxc.hpp | 2 +- src/renderer/Renderer.cpp | 3 ++ src/renderer/Renderer.h | 2 + vgframework.sln | 1 + 21 files changed, 119 insertions(+), 52 deletions(-) create mode 100644 data/Engine/BRDF/CookTorrance.png create mode 100644 data/Shaders/system/environment.hlsli diff --git a/data/Engine/BRDF/CookTorrance.png b/data/Engine/BRDF/CookTorrance.png new file mode 100644 index 0000000000000000000000000000000000000000..7d1f48aa214262a7740552b01c07c1fe669309c6 GIT binary patch literal 14940 zcmV-iI-|vjP)d58|Nn;<@VDXx{6(r-qO2JIdXvx_|F{7x8z@U`6spvi)npUArn+F9 ztZo=23-4COO__3jw596vtQTcPq#U0GsJ3BO7BxZ9M$S})58aCeN?B0IP;}D5HOYcm z6-|NImd+(LjpM4;XO3z~%mMStpDRy8*MN@jR0~iGN@d79N`*K-udf!HHXakmK??58 zIZ%L_f?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J@+#PN>)ul&lp<@QAAd8~l(Y{Qe8#2o;EeuIv`-1wFE%e@?UydJ3k zgZgJ={L!0hh2~d&GD aY4Csch2NW9up-U?0000 - + @@ -655,8 +655,8 @@ - - + + diff --git a/data/Shaders/background/background.hlsl b/data/Shaders/background/background.hlsl index 99695beee..141668af2 100644 --- a/data/Shaders/background/background.hlsl +++ b/data/Shaders/background/background.hlsl @@ -1,4 +1,9 @@ #include "system/semantics.hlsli" +#include "system/table.hlsli" +#include "system/view.hlsli" +#include "system/bindless.hlsli" +#include "system/samplers.hlsli" +#include "system/environment.hlsli" #include "background.hlsli" struct VS_Output_Quad @@ -26,7 +31,13 @@ PS_Output_Quad PS_Gradient(VS_Output_Quad _input) { PS_Output_Quad output; float2 uv = _input.uv; - output.color0 = rootConstants.color; + + //output.color0 = rootConstants.color; + + ViewConstants viewConstants; + viewConstants.Load(getBuffer(RESERVEDSLOT_BUFSRV_VIEWCONSTANTS)); + output.color0 = float4(getEnvironmentBackgroundColor(uv, viewConstants), 1); + return output; } diff --git a/data/Shaders/lighting/deferredLighting.hlsl b/data/Shaders/lighting/deferredLighting.hlsl index ca494072a..056c461b2 100644 --- a/data/Shaders/lighting/deferredLighting.hlsl +++ b/data/Shaders/lighting/deferredLighting.hlsl @@ -4,6 +4,7 @@ #include "system/view.hlsli" #include "system/lighting.hlsli" #include "system/msaa.hlsli" +#include "system/environment.hlsli" struct DepthStencilSample { @@ -45,11 +46,10 @@ struct GBufferSample float3 shadeSample(GBufferSample _gbuffer, DepthStencilSample _depthStencil, float2 _uv, ViewConstants _viewConstants) { + #if SAMPLE_COUNT > 1 if (_depthStencil.depth >= 1.0f) - { - float3 envColor = _viewConstants.getEnvironmentColor(); - return envColor; - } + return getEnvironmentBackgroundColor(_uv, _viewConstants); + #endif float3 worldPos = _viewConstants.getWorldPos(_uv, _depthStencil.depth); float3 camPos = _viewConstants.getCameraPos(); @@ -157,6 +157,11 @@ void CS_DeferredLighting(int2 dispatchThreadID : SV_DispatchThreadID) // Deferred shading result float3 color[SAMPLE_COUNT]; + #if SAMPLE_COUNT == 1 + if (depthStencilSamples[0].depth >= 1.0f) + return; + #endif + // Shade sample 0 color[0] = shadeSample(gbufferSamples[0], depthStencilSamples[0], uv, viewConstants); diff --git a/data/Shaders/system/bindless.hlsli b/data/Shaders/system/bindless.hlsli index bd0dfa297..151271024 100644 --- a/data/Shaders/system/bindless.hlsli +++ b/data/Shaders/system/bindless.hlsli @@ -1,4 +1,5 @@ -#pragma once +#ifndef _BINDLESS__HLSLI_ +#define _BINDLESS__HLSLI_ #ifdef __cplusplus #error bindless.hlsli should not be included from C++ @@ -71,4 +72,6 @@ DECL_DESCRIPTOR_RANGE_RO(RaytracingAccelerationStructure, g_TLASTable, BINDLESS_ // //RaytracingAccelerationStructure getTLAS(uint _handle) { return g_TLASTable[_handle - BINDLESS_TLAS_START]; } -#endif // __cplusplus \ No newline at end of file +#endif // __cplusplus + +#endif // _BINDLESS__HLSLI_ \ No newline at end of file diff --git a/data/Shaders/system/displaymodes.hlsli b/data/Shaders/system/displaymodes.hlsli index 7ae854694..6f31a5e76 100644 --- a/data/Shaders/system/displaymodes.hlsli +++ b/data/Shaders/system/displaymodes.hlsli @@ -1,4 +1,5 @@ -#pragma once +#ifndef _DISPLAY_MODES__HLSLI_ +#define _DISPLAY_MODES__HLSLI_ #include "types.hlsli" @@ -61,3 +62,5 @@ vg_enum(DisplayFlags, uint, AlbedoMap = 0x00000001, NormalMap = 0x00000002 ); + +#endif diff --git a/data/Shaders/system/environment.hlsli b/data/Shaders/system/environment.hlsli new file mode 100644 index 000000000..5aec9efed --- /dev/null +++ b/data/Shaders/system/environment.hlsli @@ -0,0 +1,26 @@ +#ifndef _ENVIRONMENT__HLSLI_ +#define _ENVIRONMENT__HLSLI_ + +float3 getEnvironmentBackgroundColor(float2 _uv, ViewConstants _viewConstants) +{ + //uint ambientCubemapTexHandle = _viewConstants.getEnvironmentTextureHandle(); + // + //if (ReservedSlot::InvalidTextureCube != (ReservedSlot)ambientCubemapTexHandle) + //{ + // float4 clipPos = float4(_uv*2-1, 1,1); + // float4 viewPos = mul(clipPos, _viewConstants.getProjInv()); + // viewPos.xz *= -1; + // float4 worldPos = mul(viewPos, _viewConstants.getViewInv()); + // worldPos.xyz *= -1; + // + // TextureCube cubemap = getTextureCube(ambientCubemapTexHandle); + // return cubemap.Sample(linearClamp, normalize(worldPos)); + //} + //else + { + float3 envColor = _viewConstants.getEnvironmentColor(); + return envColor; + } +} + +#endif // _ENVIRONMENT__HLSLI_ \ No newline at end of file diff --git a/data/Shaders/system/lighting.hlsli b/data/Shaders/system/lighting.hlsli index e8cf3ffba..29f9f6d59 100644 --- a/data/Shaders/system/lighting.hlsli +++ b/data/Shaders/system/lighting.hlsli @@ -58,7 +58,13 @@ float gaSchlickGGX(float cosLi, float cosLo, float roughness) //-------------------------------------------------------------------------------------- float3 fresnelSchlick(float3 F0, float cosTheta) { - return F0 + (1.0f - F0) * pow(1.0f - cosTheta, 4.0f); + return F0 + (1.0f - F0) * pow(1.0f - cosTheta, 5.0f); +} + +//-------------------------------------------------------------------------------------- +float3 fresnelSchlickRoughness(float3 F0, float cosTheta, float roughness) +{ + return F0 + (max(float3(1.0 - roughness, 1.0 - roughness, 1.0 - roughness), F0) - F0) * pow(1.0 - cosTheta, 5.0); } //-------------------------------------------------------------------------------------- @@ -75,7 +81,7 @@ struct LightingResult float3 Lh = normalize(Li + Lo); // Calculate angles between surface normal and various light vectors. - float cosLi = _cosLi; //max(0.0f, dot(_worldNormal, Li)); + float cosLi = _cosLi; float cosLh = max(0.0f, dot(_worldNormal, Lh)); // Calculate Fresnel term for direct lighting. @@ -95,7 +101,7 @@ struct LightingResult // Lambert diffuse BRDF. // We don't scale by 1/PI for lighting & material units to be more convenient. // See: https://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/ - float3 diffuseBRDF = kd;// * _albedo; + float3 diffuseBRDF = kd; // Cook-Torrance specular microfacet BRDF. float3 specularBRDF = (F * D * G) / max(Epsilon, 4.0 * cosLi * cosLo); @@ -192,21 +198,15 @@ LightingResult computeDirectLighting(ViewConstants _viewConstants, float3 _eyePo cubemap.GetDimensions(0, width, height, mipLevels); // environment diffuse - - // Calculate Fresnel term for ambient lighting. - // Since we use pre-filtered cubemap(s) and irradiance is coming from many directions - // use cosLo instead of angle with light's half-vector (cosLh above). - // See: https://seblagarde.wordpress.com/2011/08/17/hello-world/ float3 F = fresnelSchlick(F0, cosLo); - - // Get diffuse contribution factor (as with direct lighting). float3 kd = lerp(1.0 - F, 0.0, metalness); + float diffuseEnvMip = mipLevels-1; + output.envDiffuse = kd * cubemap.SampleLevel(linearClamp, normalize(_worldNormal.rgb), diffuseEnvMip).rgb * ambientIntensity; - output.envDiffuse = kd * cubemap.SampleLevel(linearClamp, normalize(_worldNormal.rgb), mipLevels-1).rgb * ambientIntensity; - - // environment specular - float mipLevel = roughness * (mipLevels - 1); - output.envSpecular = F * cubemap.SampleLevel(linearClamp, Lr, mipLevel).rgb * ambientIntensity; + // environment specular using split-sum approximation factors for Cook-Torrance specular BRDF. + float2 specularBRDF = getTexture2D((uint)ReservedSlot::CookTorranceBRDF).Sample(linearClamp, float2(cosLo, roughness)).rg; + float specularEnvMip = roughness * (mipLevels - 1); + output.envSpecular = (F0 * specularBRDF.x + specularBRDF.y) * cubemap.SampleLevel(linearClamp, Lr, specularEnvMip).rgb * ambientIntensity; } else { @@ -217,6 +217,9 @@ LightingResult computeDirectLighting(ViewConstants _viewConstants, float3 _eyePo output.envSpecular = _viewConstants.getEnvironmentColor() * ambientIntensity; } + output.envDiffuse *= occlusion; + output.envSpecular *= occlusion; + for(uint i=0; i < lightsHeader.getDirectionalCount(); ++i) { DirectionalLightConstants directional = lights.Load(offset); diff --git a/data/Shaders/system/table.hlsli b/data/Shaders/system/table.hlsli index cd936d920..7f417a434 100644 --- a/data/Shaders/system/table.hlsli +++ b/data/Shaders/system/table.hlsli @@ -38,6 +38,7 @@ vg_enum_class(ReservedSlot, uint, // Texture + CookTorranceBRDF = BINDLESS_TEXTURE_INVALID - 6, ImGuiFontTexSrv = BINDLESS_TEXTURE_INVALID - 5, DefaultPBRTexSrv = BINDLESS_TEXTURE_INVALID - 4, DefaultNormalTexSrv = BINDLESS_TEXTURE_INVALID - 3, diff --git a/data/Shaders/system/view.hlsli b/data/Shaders/system/view.hlsli index 45def3cc8..7dec2522f 100644 --- a/data/Shaders/system/view.hlsli +++ b/data/Shaders/system/view.hlsli @@ -1,4 +1,5 @@ -#pragma once +#ifndef _VIEW__HLSLI_ +#define _VIEW__HLSLI_ #include "types.hlsli" #include "packing.hlsli" @@ -114,4 +115,6 @@ struct ViewConstants void setEnvironmentTextureHandle(uint _value) { m_textures.x = packUint16low(m_textures.x, _value); } uint getEnvironmentTextureHandle() { return unpackUint16low(m_textures.x); } -}; \ No newline at end of file +}; + +#endif // _VIEW__HLSLI_ \ No newline at end of file diff --git a/data/Textures/EnvMaps/Default.psd b/data/Textures/EnvMaps/Default.psd index 1c7b3246d1d3abbed0c80b8e01969c01aff7e56b..13945fd19ce7b9ba080d12ea957c7bad5dc5cda3 100644 GIT binary patch literal 37282 zcmeG_30zZ0`V&CT2y%Fq)zpG`K}ZlWs89tJP(Tr{x@|Wk4~T{&%>n4HV!ZGM5m8&M zN4=`HwXGFU|Et!v{;m6O*Q2LhtF^7QZdFt)n&iFxW|Hv2C7?q7UGv^==FNQb9W&pX zH^(<0VaUkw6A=fQFK2ihLpbY>a2l?VZbL>UCcC(hj9Z`+LQZfKSTKQg8qK}Ev`@w4 zZ})HHY~8=BIFFPC;j-=#!(#JQV#!QO%gdm$WQyS-HxC~T;mM@KL#9L~hbODzsBBrn zY&A7;c1pTr_DqRL8WJ1hIV?XqKSz~AX~n$!9JxXhoj*K8ELCPu(U8Vqeh81CXlD)& znVLMFr&TKDGi6#{L|AyJaL7PjrdpgswH00+C3>4;S)D0BF- zseD0LI3EOg@`$K-N+VIrR9cx*!Na1(8A_dYc!*9XlSW4ji4tT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PnpN|9mnW1Hdu>=oS1$Rea1%7G5UgOoaOuea7fBMxQay z4@aNz=ioD@SCY%=Gcg+Tk-9mJd8-yyBc(zu#X)V`+}P0KWNj9T8pxl8+*>D|uu} zh)6%DeYwW;-35}h8nWc`#cDGhr$3RW&dC8H1Whwj z(~^(ZPF+|BeMc}a-#&>lAuY*pTMzZ03R^o)wdWUXNa6&=K05~i?jeQVB0P-s;yJ#e^A$tv+_)I;}B8w z>x<-ZF|nM%PC0{V{E~h#C0_k5;59lCY9zltk=;Bldjd@^gVq!;(>R9dN(x^xJGY?S zLTZN_Vp_tEO}CcOLXKA##c^;o-O8>luxZU;rz(R%vZT#<9V95`34dvzVLgwBn)3J| z+`aJvebZ*s@p)}Ju7geGS7V3QP@h3`gHzU$j;lEO5?i0Vad4%y5)#P6J>>4To>Uk{Z5Idb3ocZXMtoQ7^zZ#-*BXjQb((2VqeS-x%k^zRic9 E0A(0tjQ{`u diff --git a/src/engine/Resource/Texture/TextureResourceMeta.hpp b/src/engine/Resource/Texture/TextureResourceMeta.hpp index 07ff85daf..62bb24b46 100644 --- a/src/engine/Resource/Texture/TextureResourceMeta.hpp +++ b/src/engine/Resource/Texture/TextureResourceMeta.hpp @@ -16,7 +16,7 @@ namespace vg::engine registerPropertyEnum(TextureResourceMeta, gfx::TextureImporterType, m_importSettings.m_importerType, "Type"); registerPropertyEnum(TextureResourceMeta, gfx::TextureImporterFormat, m_importSettings.m_importerFormat, "Format"); registerProperty(TextureResourceMeta, m_importSettings.m_sRGB, "sRGB"); - registerPropertyEnum(TextureResourceMeta, gfx::MipLevelCount, m_importSettings.m_mipLevelCount, "Mipmaps"); + registerPropertyEnum(TextureResourceMeta, gfx::TextureImporterMipLevelCount, m_importSettings.m_mipLevelCount, "Mipmaps"); registerPropertyEnum(TextureResourceMeta, gfx::Downscale, m_importSettings.m_downscale, "Downscale"); return true; diff --git a/src/gfx/Device/Device.cpp b/src/gfx/Device/Device.cpp index 699806813..44abc488b 100644 --- a/src/gfx/Device/Device.cpp +++ b/src/gfx/Device/Device.cpp @@ -15,6 +15,7 @@ #include "gfx/Profiler/Profiler.h" #include "gfx/Importer/TextureImporter.h" #include "gfx/RingBuffer/Upload/UploadBuffer.h" +#include "gfx/Importer/TextureImporterSettings.h" #if !VG_ENABLE_INLINE #include "Device.inl" @@ -443,22 +444,26 @@ namespace vg::gfx } //-------------------------------------------------------------------------------------- - //Texture * Device::createTexture(const core::string & _path, ReservedSlot _reservedSlot) - //{ - // TextureDesc texDesc; - // core::vector texData; - // - // if (m_textureImporter->importTextureData(_path, texDesc, texData)) - // { - // Texture * tex = createTexture(texDesc, _path, texData.data(), _reservedSlot); - // return tex; - // } - // else - // { - // VG_ERROR("[Device] Failed to create texture from \"%s\"", _path.c_str()); - // } - // return nullptr; - //} + Texture * Device::createTexture(const core::string & _path, ReservedSlot _reservedSlot) + { + TextureDesc texDesc; + core::vector texData; + + TextureImporterSettings settings; + settings.m_mipLevelCount = (TextureImporterMipLevelCount)1; + settings.m_sRGB = false; + + if (m_textureImporter->importTextureData(_path, texDesc, texData, &settings)) + { + Texture * tex = createTexture(texDesc, _path, texData.data(), _reservedSlot); + return tex; + } + else + { + VG_ERROR("[Device] Failed to create texture from \"%s\"", _path.c_str()); + } + return nullptr; + } //-------------------------------------------------------------------------------------- Buffer * Device::createBuffer(const BufferDesc & _bufDesc, const core::string & _name, const void * _initData, ReservedSlot _reservedSlot) diff --git a/src/gfx/Device/Device.h b/src/gfx/Device/Device.h index e262afbbb..9bcb60760 100644 --- a/src/gfx/Device/Device.h +++ b/src/gfx/Device/Device.h @@ -160,7 +160,7 @@ namespace vg::gfx void endFrame (); Texture * createTexture (const TextureDesc & _texDesc, const core::string & _name, const void * _initData = nullptr, ReservedSlot _reservedSlot = ReservedSlot::None); - //Texture * createTexture (const core::string & _path, ReservedSlot _reservedSlot = ReservedSlot::None); + Texture * createTexture (const core::string & _path, ReservedSlot _reservedSlot = ReservedSlot::None); Buffer * createBuffer (const BufferDesc & _bufDesc, const core::string & _name, const void * _initData = nullptr, ReservedSlot _reservedSlot = ReservedSlot::None); RootSignatureHandle addRootSignature (const RootSignatureDesc & _desc); diff --git a/src/gfx/Importer/TextureImporter.hpp b/src/gfx/Importer/TextureImporter.hpp index d8ccba28b..08756a484 100644 --- a/src/gfx/Importer/TextureImporter.hpp +++ b/src/gfx/Importer/TextureImporter.hpp @@ -67,7 +67,7 @@ namespace vg::gfx } // recompute mipmap count - if (_importSettings && MipLevelCount::Automatic != _importSettings->m_mipLevelCount) + if (_importSettings && TextureImporterMipLevelCount::Automatic != _importSettings->m_mipLevelCount) { const uint maxMipCount = computeMaxMipmapCount(type, width, height, slices); mipmapCount = min((uint)_importSettings->m_mipLevelCount, maxMipCount); @@ -86,7 +86,7 @@ namespace vg::gfx sRGB = false; } - if (nullptr == _importSettings || MipLevelCount::Automatic == _importSettings->m_mipLevelCount) + if (nullptr == _importSettings || TextureImporterMipLevelCount::Automatic == _importSettings->m_mipLevelCount) { const uint maxMipCount = computeMaxMipmapCount(type, width, height, slices); mipmapCount = maxMipCount; @@ -103,7 +103,7 @@ namespace vg::gfx sRGB = _importSettings->m_sRGB; - if (MipLevelCount::Automatic != _importSettings->m_mipLevelCount) + if (TextureImporterMipLevelCount::Automatic != _importSettings->m_mipLevelCount) { const uint maxMipCount = computeMaxMipmapCount(type, width, height, slices); mipmapCount = min((uint)_importSettings->m_mipLevelCount, maxMipCount); diff --git a/src/gfx/Importer/TextureImporterSettings.h b/src/gfx/Importer/TextureImporterSettings.h index a3424ceb0..a2fdb0d83 100644 --- a/src/gfx/Importer/TextureImporterSettings.h +++ b/src/gfx/Importer/TextureImporterSettings.h @@ -17,7 +17,7 @@ namespace vg::gfx RGBA8 = 1 ); - vg_enum_class(MipLevelCount, core::u8, + vg_enum_class(TextureImporterMipLevelCount, core::u8, Automatic = 0, MipLevelCount_1 = 1, @@ -51,7 +51,7 @@ namespace vg::gfx TextureImporterType m_importerType = TextureImporterType::Automatic; TextureImporterFormat m_importerFormat = TextureImporterFormat::Automatic; bool m_sRGB = true; - MipLevelCount m_mipLevelCount = MipLevelCount::Automatic; + TextureImporterMipLevelCount m_mipLevelCount = TextureImporterMipLevelCount::Automatic; Downscale m_downscale = Downscale::None; }; } \ No newline at end of file diff --git a/src/gfx/Shader/ShaderManager.hpp b/src/gfx/Shader/ShaderManager.hpp index 3afacd597..4287af39b 100644 --- a/src/gfx/Shader/ShaderManager.hpp +++ b/src/gfx/Shader/ShaderManager.hpp @@ -20,6 +20,7 @@ namespace vg::gfx // TODO: read dir to root folders names used #include ? m_shaderRootFolders.push_back("system"); + m_shaderRootFolders.push_back("background"); m_shaderRootFolders.push_back("extern"); m_shaderCompiler = new ShaderCompiler(); diff --git a/src/gfx/Shader/dxc/ShaderCompiler_dxc.hpp b/src/gfx/Shader/dxc/ShaderCompiler_dxc.hpp index aed74c314..ff421eda0 100644 --- a/src/gfx/Shader/dxc/ShaderCompiler_dxc.hpp +++ b/src/gfx/Shader/dxc/ShaderCompiler_dxc.hpp @@ -39,7 +39,7 @@ class CustomIncludeHandler : public IDxcIncludeHandler { const string shaderIncludeFolder = rootFolders[i]; - auto lastShaderFolder = tolower(path).rfind(shaderIncludeFolder); + auto lastShaderFolder = tolower(path).rfind(shaderIncludeFolder+"/"); if (string::npos != lastShaderFolder) { lastShaderFolder += shaderIncludeFolder.length() + 1; diff --git a/src/renderer/Renderer.cpp b/src/renderer/Renderer.cpp index a3b37fc96..ed4231fb6 100644 --- a/src/renderer/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -234,6 +234,8 @@ namespace vg::renderer VG_SAFE_RELEASE(gameViewport); } + + m_cookTorranceBRDF = m_device.createTexture("data/Engine/BRDF/CookTorrance.png", ReservedSlot::CookTorranceBRDF); } //-------------------------------------------------------------------------------------- @@ -256,6 +258,7 @@ namespace vg::renderer //-------------------------------------------------------------------------------------- void Renderer::deinit() { + VG_SAFE_RELEASE(m_cookTorranceBRDF); VG_SAFE_DELETE(m_sharedCullingJobOutput); VG_SAFE_RELEASE(m_hdrOutput); diff --git a/src/renderer/Renderer.h b/src/renderer/Renderer.h index 7ae1b409a..ad2149862 100644 --- a/src/renderer/Renderer.h +++ b/src/renderer/Renderer.h @@ -164,6 +164,8 @@ namespace vg::renderer // TODO : remove core::vector m_views[core::enumCount()]; + + gfx::Texture * m_cookTorranceBRDF = nullptr; }; } diff --git a/vgframework.sln b/vgframework.sln index 9fa48e580..8699fc4cf 100644 --- a/vgframework.sln +++ b/vgframework.sln @@ -85,6 +85,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "system", "system", "{34ABDE data\Shaders\system\depthbias.hlsli = data\Shaders\system\depthbias.hlsli data\Shaders\system\depthstencil.hlsli = data\Shaders\system\depthstencil.hlsli data\Shaders\system\displaymodes.hlsli = data\Shaders\system\displaymodes.hlsli + data\Shaders\system\environment.hlsli = data\Shaders\system\environment.hlsli data\Shaders\system\gamma.hlsli = data\Shaders\system\gamma.hlsli data\Shaders\system\instancedata.hlsli = data\Shaders\system\instancedata.hlsli data\Shaders\system\lighting.hlsli = data\Shaders\system\lighting.hlsli