You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The floor operations used by the ARL and EXP instructions must
operate identically. Specifically, the EXP instruction's floor(t.x)
intermediate result must exactly match the integer stored in the
address register by the ARL instruction.
Also see #79 for our current hack, which breaks this assumption.
Although I can't think of an example algorithm, having these in sync could be very critical, so we should respect this (there's probably good a reason why the spec is so specific).
I suggest adding our own biased_floor function or global constant for the bias (maybe pick a better name which respects our GLSL style), and using it in ARL and EXP.
Please also think about cases where our bias might run into problems (I worry about the result.y line because it might break assumption about returning [0.0;1.0[ ), so we can review the use of a bias or change it's value to avoid those problems.
So if it would break assumptions, we might have to add the bias to src for all operations in EXP.
The LOG function, the counter-part to EXP, is probably affected by this too.
The text was updated successfully, but these errors were encountered:
From 2.14.1.11 (Vertex Program Floating Point Requirements):
Also see #79 for our current hack, which breaks this assumption.
Although I can't think of an example algorithm, having these in sync could be very critical, so we should respect this (there's probably good a reason why the spec is so specific).
I suggest adding our own
biased_floor
function or global constant for the bias (maybe pick a better name which respects our GLSL style), and using it in ARL and EXP.Please also think about cases where our bias might run into problems (I worry about the result.y line because it might break assumption about returning [0.0;1.0[ ), so we can review the use of a bias or change it's value to avoid those problems.
So if it would break assumptions, we might have to add the bias to
src
for all operations in EXP.The LOG function, the counter-part to EXP, is probably affected by this too.
The text was updated successfully, but these errors were encountered: