From 5925dae3a6df37e07255c4e446644c918c9ad7d0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 13 May 2024 21:13:34 -0700 Subject: [PATCH] PBR Renderer: use float3 for IBL scale --- Shaders/PBR/private/RenderPBR.psh | 2 +- Shaders/PBR/public/PBR_Shading.fxh | 2 +- Shaders/PBR/public/PBR_Structures.fxh | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Shaders/PBR/private/RenderPBR.psh b/Shaders/PBR/private/RenderPBR.psh index 1293fa12..7db1b59e 100644 --- a/Shaders/PBR/private/RenderPBR.psh +++ b/Shaders/PBR/private/RenderPBR.psh @@ -283,7 +283,7 @@ SurfaceShadingInfo GetSurfaceShadingInfo(in VSOutput VSOut, Shading.Occlusion = GetOcclusion(VSOut, Material, g_Frame.Renderer.MipBias); Shading.Emissive = GetEmissive(VSOut, Material, g_Frame.Renderer.MipBias); - Shading.IBLScale = g_Frame.Renderer.IBLScale; + Shading.IBLScale = g_Frame.Renderer.IBLScale.rgb; Shading.Occlusion = lerp(1.0, Shading.Occlusion, g_Frame.Renderer.OcclusionStrength); Shading.Emissive *= g_Frame.Renderer.EmissionScale; diff --git a/Shaders/PBR/public/PBR_Shading.fxh b/Shaders/PBR/public/PBR_Shading.fxh index 51803f32..21921177 100644 --- a/Shaders/PBR/public/PBR_Shading.fxh +++ b/Shaders/PBR/public/PBR_Shading.fxh @@ -557,7 +557,7 @@ struct SurfaceShadingInfo float VolumeThickness; #endif - float IBLScale; + float3 IBLScale; }; struct LayerLightingInfo diff --git a/Shaders/PBR/public/PBR_Structures.fxh b/Shaders/PBR/public/PBR_Structures.fxh index 8181fbce..c9a999da 100644 --- a/Shaders/PBR/public/PBR_Structures.fxh +++ b/Shaders/PBR/public/PBR_Structures.fxh @@ -79,15 +79,17 @@ struct PBRRendererShaderParameters float WhitePoint; float PrefilteredCubeLastMip; // Prefiltered cube map last mip level - float IBLScale; + float4 IBLScale; + float OcclusionStrength; float EmissionScale; float PointSize; // OpenGL and Vulkan - float MipBias; + int LightCount; float Padding0; float Padding1; + float Padding2; float4 UnshadedColor; float4 HighlightColor;