Skip to content

Commit

Permalink
PBR Renderer: use float3 for IBL scale
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed May 14, 2024
1 parent 368133f commit 5925dae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Shaders/PBR/private/RenderPBR.psh
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Shaders/PBR/public/PBR_Shading.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ struct SurfaceShadingInfo
float VolumeThickness;
#endif

float IBLScale;
float3 IBLScale;
};

struct LayerLightingInfo
Expand Down
6 changes: 4 additions & 2 deletions Shaders/PBR/public/PBR_Structures.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5925dae

Please sign in to comment.