From 56ef145248f2e0c6f8716d359cea8a3a6b656e7d Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Wed, 28 Feb 2024 17:33:14 +0800 Subject: [PATCH] vault backup: 2024-02-28 17:33:14 --- .../UE4 BasePassPixelShader.usf学习笔记.md | 58 +++++++++++++++++++ 07-Other/生活/装修相关.md | 7 ++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/03-UnrealEngine/Rendering/RenderingPipeline/UE4 BasePassPixelShader.usf学习笔记.md b/03-UnrealEngine/Rendering/RenderingPipeline/UE4 BasePassPixelShader.usf学习笔记.md index 484b425..07e8dbf 100644 --- a/03-UnrealEngine/Rendering/RenderingPipeline/UE4 BasePassPixelShader.usf学习笔记.md +++ b/03-UnrealEngine/Rendering/RenderingPipeline/UE4 BasePassPixelShader.usf学习笔记.md @@ -111,3 +111,61 @@ const float3 WaterDiffuseIndirectIlluminance = DiffuseIndirectLighting * PI;// D 8. Out.MRT[0].rgb *= ViewPreExposure; ### 1553:FinalizeVirtualTextureFeedback + +# UE5 + +## Lumen相关 +- GetSkyLighting() + - Lumen + - GetTranslucencyGIVolumeLighting() + - SkyLighting + - GetEffectiveSkySHDiffuse() + - GetVolumetricLightmapSkyBentNormal() + - GetSkyBentNormalAndOcclusion() + +**GetSkyLighting()** 演示了采样SkyLight与Lumen的方法。 + +### SkyLighting +GetEffectiveSkySHDiffuse()是一个宏,会根据平台指向下面2个函数: +```c++ +/** + * Computes sky diffuse lighting from the SH irradiance map. + * This has the SH basis evaluation and diffuse convolution weights combined for minimal ALU's - see "Stupid Spherical Harmonics (SH) Tricks" + */ +float3 GetSkySHDiffuse(float3 Normal) +{ + float4 NormalVector = float4(Normal, 1.0f); + float3 Intermediate0, Intermediate1, Intermediate2; + Intermediate0.x = dot(SkyIrradianceEnvironmentMap[0], NormalVector); + Intermediate0.y = dot(SkyIrradianceEnvironmentMap[1], NormalVector); + Intermediate0.z = dot(SkyIrradianceEnvironmentMap[2], NormalVector); + + float4 vB = NormalVector.xyzz * NormalVector.yzzx; + Intermediate1.x = dot(SkyIrradianceEnvironmentMap[3], vB); + Intermediate1.y = dot(SkyIrradianceEnvironmentMap[4], vB); + Intermediate1.z = dot(SkyIrradianceEnvironmentMap[5], vB); + + float vC = NormalVector.x * NormalVector.x - NormalVector.y * NormalVector.y; + Intermediate2 = SkyIrradianceEnvironmentMap[6].xyz * vC; + + // max to not get negative colors + return max(0, Intermediate0 + Intermediate1 + Intermediate2); +} + +/** +* Computes sky diffuse lighting from the SH irradiance map. +* This has the SH basis evaluation and diffuse convolution weights combined for minimal ALU's - see "Stupid Spherical Harmonics (SH) Tricks" +* Only does the first 3 components for speed. +*/ +float3 GetSkySHDiffuseSimple(float3 Normal) +{ + float4 NormalVector = float4(Normal, 1); + + float3 Intermediate0; + Intermediate0.x = dot(SkyIrradianceEnvironmentMap[0], NormalVector); + Intermediate0.y = dot(SkyIrradianceEnvironmentMap[1], NormalVector); + Intermediate0.z = dot(SkyIrradianceEnvironmentMap[2], NormalVector); + // max to not get negative colors + return max(0, Intermediate0); +} +``` \ No newline at end of file diff --git a/07-Other/生活/装修相关.md b/07-Other/生活/装修相关.md index f7ef7de..112f0b4 100644 --- a/07-Other/生活/装修相关.md +++ b/07-Other/生活/装修相关.md @@ -23,6 +23,9 @@ - 轻松解决卫生间的潮湿异味💩暗卫必看!: https://www.bilibili.com/video/BV14K411M7u2/?share_source=copy_web&vd_source=fe8142e8e12816535feaeabd6f6cdc8e&t=79 - 卫生间的门需要安装百叶或者下面留缝,不然换气扇抽不动。 - 关闭马桶盖再冲厕所。 +- 布线&WiFi + - https://www.bilibili.com/video/BV1RB4y1j7wK/?p=5&spm_id_from=pageDriver + - 使用Wifi Man APP测试WiFi信号强度。(还有OpenSpeedTest、SpeedTest、全球网测) - 衣柜 - 砌墙衣柜好处与施工事项:https://www.bilibili.com/video/BV1wY4y197q5/?spm_id_from=333.788&vd_source=d47c0bb42f9c72fd7d74562185cee290 - 砌墙衣柜。可以自由改变格局,可以放入更多的东西。 @@ -61,4 +64,6 @@ - 最好要接入的电器:空气净化器、加湿器、智能浴霸、晾衣架。 - 智能家居装修时需要注意: - 灯光设计 - - 布线与电位(主路由网线需要有来回,尽可能多留网口、开关盒留零线、多留插座) \ No newline at end of file + - 布线与电位(主路由网线需要有来回,尽可能多留网口、开关盒留零线、多留插座) +- 烘干机 + - 海尔、美的 \ No newline at end of file