mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
better rendering of Solv into the glitchy region
This commit is contained in:
parent
fd67768234
commit
a741446b7b
@ -827,9 +827,7 @@ string solhelp() {
|
||||
"Solv (aka Sol) is a 3D space where directions work in different ways. It is described by the following metric:\n"
|
||||
"ds² = (eᶻdx)² + (e⁻ᶻdy)² + dz²\n\n"
|
||||
"You are currently displaying Solv in the perspective projection based on native geodesics. You can control how "
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered.\n\n"
|
||||
"Cells with relative x,y coordinates both over %1 and z coordinate below %2 are not rendered for technical reasons"
|
||||
" (geodesics to that points are too weird).", fts(solv::glitch_xy), fts(solv::glitch_z)
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered."
|
||||
);
|
||||
#else
|
||||
return "";
|
||||
|
@ -8353,18 +8353,14 @@ S(
|
||||
"Solv (aka Sol) is a 3D space where directions work in different ways. It is described by the following metric:\n"
|
||||
"ds² = (eᶻdx)² + (e⁻ᶻdy)² + dz²\n\n"
|
||||
"You are currently displaying Solv in the perspective projection based on native geodesics. You can control how "
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered.\n\n"
|
||||
"Cells with relative x,y coordinates both over %1 and z coordinate below %2 are not rendered for technical reasons"
|
||||
" (geodesics to that points are too weird).",
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered.",
|
||||
|
||||
"Solv (též Sol) je 3D prostor, ve kterém směry fungují odlišně. je popsán následující metrikou: "
|
||||
"ds² = (eᶻdx)² + (e⁻ᶻdy)² + dz²\n\n"
|
||||
|
||||
"V tuto chvíli se Solv zobrazuje v perspektivní projekci založené na geodetikách. Můžeš ovládat, "
|
||||
"jak má efekt mlhy záviset na geodetické vzdálenosti a jak vzdálené objekty ve směrech "
|
||||
"X/Y/Z se mají vykreslovat.\n\n"
|
||||
"Políčka s relativními x,y souřadnicemi převyšujícími %1 a relativní souřadnicí z menší než %2 se z technických důvodů nevykreslují "
|
||||
"(geodetiky, které k nim vedou, jsou příliš podivné).")
|
||||
"X/Y/Z se mají vykreslovat.")
|
||||
|
||||
S("max difference in X/Y coordinates", "maximální rozdíl v souřadnicích X/Y")
|
||||
S("max difference in Z coordinate", "maximální rozdíl v souřadnici Z")
|
||||
|
@ -8073,17 +8073,13 @@ S(
|
||||
"Solv (aka Sol) is a 3D space where directions work in different ways. It is described by the following metric:\n"
|
||||
"ds² = (eᶻdx)² + (e⁻ᶻdy)² + dz²\n\n"
|
||||
"You are currently displaying Solv in the perspective projection based on native geodesics. You can control how "
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered.\n\n"
|
||||
"Cells with relative x,y coordinates both over %1 and z coordinate below %2 are not rendered for technical reasons"
|
||||
" (geodesics to that points are too weird).",
|
||||
"the fog effects depends on the geodesic distance, and how far object in X/Y/Z coordinates are rendered.",
|
||||
|
||||
"Solv (albo Sol) to przestrzeń trójwymiarowa, w której kierunki działają w różny sposób. Jest ona opisana "
|
||||
"następującą metryką: ds² = (eᶻdx)² + (e⁻ᶻdy)² + dz²\n\n"
|
||||
|
||||
"Obecnie Solv jest przedstawiona w rzucie perspektywistycznym, opartym na geodezyjnych. Możesz określić, "
|
||||
"jak efekt mgły wpyłwa na odległość po geodezyjnej, i w jakiej odległości X/Y/Z obiekty są renderowane. "
|
||||
"Komórki z obiema względnymi współrzędnymi X,Y powyżej %1 i współrzędną Z poniżej %2 nie są renderowane ze "
|
||||
"względów technicznych (geodezyjne do tych punktów są zbyt dziwne).")
|
||||
"jak efekt mgły wpyłwa na odległość po geodezyjnej, i w jakiej odległości X/Y/Z obiekty są renderowane.")
|
||||
|
||||
S("max difference in X/Y coordinates", "maksymalna różnica współrzędnch X/Y")
|
||||
S("max difference in Z coordinate", "maksymalna różnica współrzędnej Z")
|
||||
|
@ -69,7 +69,7 @@ EX namespace solv {
|
||||
);
|
||||
}
|
||||
|
||||
ld x_to_ix(ld u) {
|
||||
EX ld x_to_ix(ld u) {
|
||||
if(u == 0.) return 0.;
|
||||
ld diag = u*u/2.;
|
||||
|
||||
@ -283,11 +283,7 @@ EX namespace solv {
|
||||
EX ld solrange_xy = 15;
|
||||
EX ld solrange_z = 4;
|
||||
|
||||
EX ld glitch_xy = 2;
|
||||
EX ld glitch_z = 0.6;
|
||||
|
||||
EX bool in_table_range(hyperpoint h) {
|
||||
if(abs(h[0]) > glitch_xy && abs(h[1]) > glitch_xy && abs(h[2]) < glitch_z) return false;
|
||||
return abs(h[0]) < solrange_xy && abs(h[1]) < solrange_xy && abs(h[2]) < solrange_z;
|
||||
}
|
||||
|
||||
@ -328,7 +324,18 @@ EX namespace solv {
|
||||
"if(h[2] < 1e-6) { iz = -iz; float s = ix; ix = iy; iy = s; }"
|
||||
"if(iz < 0.) iz = 0.;"
|
||||
|
||||
"vec4 res = texture3D(tInvExpTable, vec3(ix*(1.-1./PRECX) + 0.5/PRECX, iy*(1.-1./PRECY) + .5/PRECY, iz*(1.-1./PRECZ) + .5/PRECZ));"
|
||||
"vec4 res;"
|
||||
|
||||
"float cx = ix*(1.-1./PRECX) + .5/PRECX;"
|
||||
"float cy = iy*(1.-1./PRECY) + .5/PRECY;"
|
||||
"float cz = iz*(1.-1./PRECZ) + .5/PRECZ;"
|
||||
|
||||
"if(ix > .5 && iy > .6 && ix < iy + .05 && iz < .2 && iz < (iy - 0.5) * 0.6)"
|
||||
"res = vec4(0.,0.,0.,1.); "
|
||||
|
||||
"else "
|
||||
|
||||
"res = texture3D(tInvExpTable, vec3(cx, cy, cz));"
|
||||
|
||||
"if(h[2] < 1e-6) { res.xy = res.yx; res[2] = -res[2]; }"
|
||||
"if(h[0] < 0.) res[0] = -res[0];"
|
||||
@ -1447,11 +1454,6 @@ EX namespace nisot {
|
||||
shift(); solv::solfname = args();
|
||||
return 0;
|
||||
}
|
||||
else if(argis("-solglitch")) {
|
||||
shift_arg_formula(solv::glitch_xy);
|
||||
shift_arg_formula(solv::glitch_z);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
else if(argis("-solgeo")) {
|
||||
geodesic_movement = true;
|
||||
|
Loading…
Reference in New Issue
Block a user