Open JayFoxRox opened 5 years ago
I've rebased this on the latest master
"psh: Use vec3 for rgb, float for alpha and vec4 for registers" -> "disallow-dot-in-alpha" was accidentally renamed - hopefully not modified much more
Using
qstring_append(vars, "vec4 pFog = vec4(fogColor.rgb, 1.0 + 0.0 * clamp(vtx.Fog / vtx.inv_w, 0.0, 1.0));\n");
fixes the colors of the menu text in tony hawks americans wasteland
For time reasons, I should PR those changes which don't modify behaviour upstream asap. I can then fix the others in a second step (changes I'm sure about) or third (changes I'm not so sure about).
Does a lot of smaller changes to bring our implementation closer to NV_register_combiners.
Addressed problems
Clamping in in- and outputsUpstreamedNumber of components for inputs
WTF did I mean by this? vector sizes?
V1R0_SUM flags
Final Combiner G is alphaUpstreamedRe-evaluation of GLSL expressions
Fix broken GLSL in case of MUX, also use correct types and avoid casts if not necessary
Data hazards
Variables might be overwritten before they get used as input because AB, CD and SUM should run in parallel and fill outputs for the next stage.
I've attempted to fix this, but the code is horrible.
This change makes the emulation more accurate and faster.
Many GL errors (possibly conflicting hardware states) are not checked
Someone will eventually have to try each of them.
TODO: