On Tue Oct 10 01:42:16 2023 +0000, Petrichor Park wrote:
changed this line in [version 2 of the diff](/wine/vkd3d/-/merge_requests/364/diffs?diff_id=74991&start_sha=cfc6abebd5eb5b015fc60673c90e90a56cdf45dc#9155b9453b4ec8ea0b9b025dfb55c061bd931610_2554_2540)
Since I don't think anybody objected against that, I'd really use the coefficients from the native compiler. See for example https://shader-playground.timjones.io/c565b1a8e6d7d102c8e9211f45b64e60. Notice, also, that the native compiler computes `result` using a slightly different formula which rather looks like `result + (x < 0.0f) * (-2.0f * result + 3.141593f)`. Unless you're seeing something different with your version of the native compiler, I'd use the same formula. Having the same exact output of the native compiler is not a goal of our HLSL compiler, but if its behavior is known and easy to replicate there's no need to go for something different.
Also for the other two commits, please try to make your implementation similar to what the native compiler produces.