Description

Materials using EyeAdaptationInverse may render incorrectly when debug visualizations are active.  

 

This issue can be resolved by modifying the EyeAdaptionInverse function in EyeAdaptionCommon.ush to look like

float InverseExposureLerp(float Exposure, float Alpha)
{
#if EYE_ADAPTATION_DISABLED
    return 1.0f;
#else
    // When Alpha=0.0, we want to multiply by 1.0. when Alpha = 1.0, we want to multiply by 1/Exposure.
    // So the lerped value is:
    //     LerpLogScale = Lerp(log(1),log(1/Exposure),T)
    // Which is simplified as:
    //     LerpLogScale = Lerp(0,-log(Exposure),T)
    //     LerpLogScale = -T * log(Exposure);    float LerpLogScale = -Alpha * log(Exposure);
    float Scale = exp(LerpLogScale);
    return Scale;
#endif
} 

 

Steps to Reproduce
  1. Drag a TutorialTPP to an empty map
  2. Turn on the GPUSkinCache >Overview visualizer
  3. Apply the modified material to TutorialTPP

Expected

The mesh draws valid colors

Actual

The mesh is black because of NaN values from EyeAdaptationInverse 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-224465 in the post.

0
Login to Vote

Unresolved
ComponentUE - Graphics Features
Affects Versions5.4.4
Target Fix5.6
CreatedSep 16, 2024
UpdatedSep 18, 2024
View Jira Issue