dpJudas wrote:Not bad phantombeta. My ideas for a shader version involved doing the linear filtering manually using texel fetches, but your version is better as it should work with anisotropic filtering I think.
I believe I tried to do that at first too, but it just didn't work well.
I do wonder if the pow() could be replaced with something cheaper.
Maybe, but I wouldn't know how to do so. That said, if you only make it possible to choose hardcoded values like with the "real" NormalNx, you could hardcode it as multiplications. That should be cheaper than a generalized exponentiation algorithm.
Supporting it for GZDoom is possible. It requires renaming the fragment input for the texcoord and putting a global variable with the old name in its place. At the start of the main() function (in main.fp) it could then apply the texcoord adjustment and store the result in the global variable.
Huh, that's nice to know. Didn't know you can have globals in GLSL like that.
[quote="dpJudas"]Not bad phantombeta. My ideas for a shader version involved doing the linear filtering manually using texel fetches, but your version is better as it should work with anisotropic filtering I think.[/quote]
I believe I tried to do that at first too, but it just didn't work well.
[quote]I do wonder if the pow() could be replaced with something cheaper.[/quote]
Maybe, but I wouldn't know how to do so. That said, if you only make it possible to choose hardcoded values like with the "real" NormalNx, you could hardcode it as multiplications. That should be cheaper than a generalized exponentiation algorithm.
[quote]Supporting it for GZDoom is possible. It requires renaming the fragment input for the texcoord and putting a global variable with the old name in its place. At the start of the main() function (in main.fp) it could then apply the texcoord adjustment and store the result in the global variable.[/quote]
Huh, that's nice to know. Didn't know you can have globals in GLSL like that.