mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-04 03:07:07 -04:00
DS: Sacrifice fog so UI doesn't clip so much with terrain
This commit is contained in:
parent
c8377c7797
commit
7330da3e5a
@ -208,7 +208,10 @@ void Gfx_ClearColor(PackedCol color) {
|
|||||||
|
|
||||||
void Gfx_EndFrame(void) {
|
void Gfx_EndFrame(void) {
|
||||||
// W buffering is used for fog
|
// W buffering is used for fog
|
||||||
GFX_FLUSH = GL_WBUFFERING;
|
// Unfortunately this results in 2D UI clipping into the world
|
||||||
|
//GFX_FLUSH = GL_WBUFFERING;
|
||||||
|
|
||||||
|
GFX_FLUSH = 0;
|
||||||
// TODO not needed?
|
// TODO not needed?
|
||||||
swiWaitForVBlank();
|
swiWaitForVBlank();
|
||||||
}
|
}
|
||||||
@ -708,7 +711,7 @@ static void SetPolygonMode() {
|
|||||||
u32 fmt =
|
u32 fmt =
|
||||||
POLY_ALPHA(blend ? 14 : 31) |
|
POLY_ALPHA(blend ? 14 : 31) |
|
||||||
(backfaceCull ? POLY_CULL_BACK : POLY_CULL_NONE) |
|
(backfaceCull ? POLY_CULL_BACK : POLY_CULL_NONE) |
|
||||||
(fogEnabled ? POLY_FOG : 0) |
|
//(fogEnabled ? POLY_FOG : 0) | fog breaks UI
|
||||||
POLY_RENDER_FAR_POLYS |
|
POLY_RENDER_FAR_POLYS |
|
||||||
POLY_RENDER_1DOT_POLYS;
|
POLY_RENDER_1DOT_POLYS;
|
||||||
|
|
||||||
@ -747,10 +750,11 @@ static void RecalculateFog() {
|
|||||||
glFogShift(shift);
|
glFogShift(shift);
|
||||||
GFX_FOG_OFFSET = 0;
|
GFX_FOG_OFFSET = 0;
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++) {
|
for (int i = 0; i < 32; i++)
|
||||||
|
{
|
||||||
int distance = (i * 512 + 256) * (0x400 >> shift);
|
int distance = (i * 512 + 256) * (0x400 >> shift);
|
||||||
int intensity = distance * 127 / fogEnd;
|
int intensity = distance * 127 / fogEnd;
|
||||||
if(intensity > 127) intensity = 127;
|
if (intensity > 127) intensity = 127;
|
||||||
|
|
||||||
GFX_FOG_TABLE[i] = intensity;
|
GFX_FOG_TABLE[i] = intensity;
|
||||||
}
|
}
|
||||||
|
@ -435,8 +435,8 @@ static unsigned cert_verifier_end_chain(const br_x509_class** ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef struct SSLContext {
|
typedef struct SSLContext {
|
||||||
br_ssl_client_context sc;
|
|
||||||
br_x509_minimal_context xc;
|
br_x509_minimal_context xc;
|
||||||
|
br_ssl_client_context sc;
|
||||||
unsigned char iobuf[BR_SSL_BUFSIZE_BIDI];
|
unsigned char iobuf[BR_SSL_BUFSIZE_BIDI];
|
||||||
br_sslio_context ioc;
|
br_sslio_context ioc;
|
||||||
cc_result readError, writeError;
|
cc_result readError, writeError;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user