[PATCH 2/8] wined3d: Avoid potential division by 0 when computing fog scale.
matteo.mystral at gmail.com
Wed Jun 17 08:35:03 CDT 2015
2015-06-17 11:57 GMT+02:00 Stefan Dösinger <stefandoesinger at gmail.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Am 2015-06-17 um 11:36 schrieb Henri Verbeet:
>> Do we really need this? It almost feels nicer to just pass "end -
>> start" to the shader and handle the division there, or perhaps even
>> just pass "start".
> I like the idea of calculating this once per draw rather than once per
> fragment. I did notice a performance difference when I wrote
> ba61730daa6a614ef07128a69a0bbca819e716b4, although it was only visible
> in a test application I wrote for World of Tanks performance, not in a
> real world game.
Yeah, that was the reasoning for passing scale instead of start to the
shader (actually I used start in my initial implementation of the fog
> I think Matteo's patch comment should be put inside the code to
> explain why the explicit check and INFINITE are there.
That's a good idea.
I don't know of any specific application requiring this right now. I
guess I can defer resending the patch in any form until (and if) we
get any indication that this is a problem.
More information about the wine-devel