mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-14 16:10:55 +00:00
Restore mediump float precision and fast-math C flag
This commit is contained in:
parent
bcf9287a85
commit
25154e5b9f
2 changed files with 2 additions and 10 deletions
5
Makefile
5
Makefile
|
@ -442,11 +442,8 @@ ifeq ($(PLATFORM),android)
|
|||
-fno-builtin-cos -fno-builtin-sin -fPIC -DARCH_STRING=\\\"$(ARCH)\\\"
|
||||
CLIENT_CFLAGS += $(SDL_CFLAGS) -DSDL_DISABLE_IMMINTRIN_H -fno-builtin-cos -fno-builtin-sin
|
||||
|
||||
# Flag -ffast-math replacement: https://pspdfkit.com/blog/2021/understanding-fast-math/
|
||||
# Flags -ffp-contract=fast -fno-trapping-math are unused because they are causing lightmap issues
|
||||
OPTIMIZEFASTMATH = -ffinite-math-only -fno-math-errno -fassociative-math -freciprocal-math -fno-signed-zeros
|
||||
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
|
||||
OPTIMIZE = $(OPTIMIZEVM) $(OPTIMIZEFASTMATH)
|
||||
OPTIMIZE = $(OPTIMIZEVM) $(OPTIMIZEFASTMATH) -ffast-math
|
||||
|
||||
HAVE_VM_COMPILED = false
|
||||
|
||||
|
|
|
@ -243,12 +243,7 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLchar *extra, char *
|
|||
// HACK: abuse the GLSL preprocessor to turn GLSL 1.20 shaders into 1.30 ones
|
||||
#ifdef __ANDROID__
|
||||
Q_strcat(dest, size, "#version 300 es\n");
|
||||
|
||||
// HACK: use in main menu medium float precision (to prevent issue with missing models textures)
|
||||
if (Cvar_Get("r_uiFullScreen", "1", 0)->integer)
|
||||
Q_strcat(dest, size, "precision mediump float;\n");
|
||||
else
|
||||
Q_strcat(dest, size, "precision highp float;\n");
|
||||
Q_strcat(dest, size, "precision mediump float;\n");
|
||||
|
||||
if(shaderType == GL_VERTEX_SHADER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue