Description

ClampedPow seems to have been added as a way to tackle common compile warnings and edge cases (particularly NaNs), but the code shouldn't be calling both an abs() then a max(). This causes negative inputs to give incorrect outputs, something that's very difficult to track down as it's unexpected behavior.

Ideally this code should be replaced by something more inline with actual pow() behavior.

Steps to Reproduce

Create a material using the Power node.
Examine the HLSL output and see the code has inserted an abs() and max() in unexpectedly.
Hooking a negative value to the Power node gives an incorrect result (should be NaN or 0).

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.154.16
Target Fix4.16
Fix Commit3367572
Main Commit3388266
Release Commit3390270
CreatedMar 16, 2017
ResolvedMar 28, 2017
UpdatedMar 21, 2019