Skip to content

Commit

Permalink
chore: 1.5 for everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentalimbed committed Aug 17, 2024
1 parent 8d11b75 commit 0b7d849
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package/Shaders/Common/Color.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ float RGBToLuminance2(float3 color)

float3 sRGB2Lin(float3 color)
{
return pow(abs(color), 2.2);
return pow(abs(color), 1.5);
}

float3 Lin2sRGB(float3 color)
{
return pow(abs(color), 1.0 / 2.2);
return pow(abs(color), 1.0 / 1.5);
}
6 changes: 3 additions & 3 deletions package/Shaders/Common/PBR.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ namespace PBR

float3 AdjustDirectionalLightColor(float3 lightColor)
{
return pbrSettings.DirectionalLightColorMultiplier * sRGB2Lin(lightColor);
return pbrSettings.DirectionalLightColorMultiplier * lightColor;
}

float3 AdjustPointLightColor(float3 lightColor)
{
return pbrSettings.PointLightColorMultiplier * sRGB2Lin(lightColor);
return pbrSettings.PointLightColorMultiplier * lightColor;
}

float3 AdjustAmbientLightColor(float3 lightColor)
{
return pbrSettings.AmbientLightColorMultiplier * sRGB2Lin(lightColor);
return pbrSettings.AmbientLightColorMultiplier * lightColor;
}

// [Jimenez et al. 2016, "Practical Realtime Strategies for Accurate Indirect Occlusion"]
Expand Down
2 changes: 2 additions & 0 deletions package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,8 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
float3 screenSpaceNormal = normalize(WorldToView(worldSpaceNormal, false, eyeIndex));

# if defined(TRUE_PBR)
baseColor.xyz = pow(baseColor.xyz, 1 / 1.5);

PBR::SurfaceProperties pbrSurfaceProperties = PBR::InitSurfaceProperties();

pbrSurfaceProperties.Roughness = saturate(rawRMAOS.x);
Expand Down

0 comments on commit 0b7d849

Please sign in to comment.