mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
nv2a: Enforce point params min/max size
[Tests](https://github.com/abaire/nxdk_pgraph_tests/blob/5920c89548e47675f28c7e347f07fc3ee54a4709/src/tests/point_sprite_tests.cpp#L27) [HW results](https://abaire.github.io/nxdk_pgraph_tests_golden_results/results/Point_sprite/index.html) Fixes #2378
This commit is contained in:
committed by
Matt Borgerson
parent
a9c699d6ec
commit
febb54bd4d
@@ -489,13 +489,15 @@ GLSL_DEFINE(materialEmissionColor, GLSL_LTCTXA(NV_IGRAPH_XF_LTCTXA_CM_COL) ".xyz
|
||||
" oPos.xy *= oPos.w;\n"
|
||||
);
|
||||
|
||||
/* FIXME: Testing */
|
||||
if (state->point_params_enable) {
|
||||
mstring_append(
|
||||
body,
|
||||
" float d_e = length(position * modelViewMat0);\n"
|
||||
" float ptMinSize = min(pointParams[7], 63.875);\n"
|
||||
" float ptMaxSize = min(pointParams[3] + ptMinSize, 63.875);\n"
|
||||
" oPts.x = 1/sqrt(pointParams[0] + pointParams[1] * d_e + pointParams[2] * d_e * d_e) + pointParams[6];\n");
|
||||
mstring_append_fmt(body, " oPts.x = min(oPts.x * pointParams[3] + pointParams[7], 64.0) * %d;\n",
|
||||
mstring_append_fmt(body,
|
||||
" oPts.x = clamp(oPts.x * pointParams[3] + pointParams[7], ptMinSize, ptMaxSize) * %d;\n",
|
||||
state->surface_scale_factor);
|
||||
} else {
|
||||
mstring_append_fmt(body, " oPts.x = %f * %d;\n", state->point_size,
|
||||
|
||||
Reference in New Issue
Block a user