On Thursday, January 5, 2017 5:47:37 PM PST Samuel Pitoiset wrote: > As explained by Nicolai, it seems like D3D always compute the > absolute value while GLSL says that the result of inversesqrt() > is undefined if x <= 0. Using the absolute value looks like safer > especially when the game has been ported from D3D to GL. > > This gets rid of the NaN values in the "Spec Ops: The Line" game > as well as the black squares. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97338 > > Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> > --- > > Nouveau also computes the absolute value before emitting RSQ. >
Would it make sense to just make the GLSL sqrt() and inversesqrt() functions take the absolute value, so we do this for all drivers? abs is cheap... --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev