Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: glsl/normal: use ifdef for normal z reconstruction #189
DO NOT MERGE until the
This is a simple change that makes glsl relying on
This is not merged yet because of a nasty bug, it looks like the define is not defined any time as while I move in map, the wrong code is sometime run instead of the expected one:
The bug is on the wall texture, not on the blooming reactor.
I reproduced the bug on both
I'm basically pushing this branch so people have code to debug the
referenced this pull request
Mar 24, 2019
right, this code is not yet used but it's better to not have bugs in dormant code
I'll reread the stuff to be sure this variable is set in any code that use normal map (they may be more), not only those that use parallax.
Well, that only fixes it for now, if I add some commits editing some unrelated stuff the bug comes back again… the unrelated commit I was working on was a commit merging reflection in lightmap stage to avoid double parallax compute… this one added a macro since the reflectCube glsl would be useless in that case, and the bug came back… I know the macro thing is tricky since each macro is a bit of one integer, may be we overflow that integer because of “too many macro”?
There is a check about that “too many macro” scenario but I never triggered it so I suspect it does not work. In some wip earlier commits I had a lot of macros and I was wondering why the "too many macro" test was not shooting at me…