mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-12 08:04:09 +02:00
fix for for mediump, enable mipmaps for low filter settings
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
#define _GAPI_GL 1
|
#define _GAPI_GL 1
|
||||||
#define _GAPI_GLES 1
|
#define _GAPI_GLES 1
|
||||||
|
|
||||||
//#define DYNGEOM_NO_VBO
|
#define DYNGEOM_NO_VBO
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
#define _OS_LINUX 1
|
#define _OS_LINUX 1
|
||||||
#define _GAPI_GL 1
|
#define _GAPI_GL 1
|
||||||
|
@@ -633,8 +633,8 @@ namespace GAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setFilterQuality(int value) {
|
void setFilterQuality(int value) {
|
||||||
bool filter = value > Core::Settings::LOW;
|
bool filter = (opt & OPT_NEAREST) == 0 && (value > Core::Settings::LOW);
|
||||||
bool mipmaps = value > Core::Settings::MEDIUM;
|
bool mipmaps = (opt & OPT_MIPMAPS) != 0;
|
||||||
|
|
||||||
Core::active.textures[0] = NULL;
|
Core::active.textures[0] = NULL;
|
||||||
bind(0);
|
bind(0);
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#define LARA_SWIM_SPEED 50.0f
|
#define LARA_SWIM_SPEED 50.0f
|
||||||
#define LARA_SWIM_FRICTION 1.0f
|
#define LARA_SWIM_FRICTION 1.0f
|
||||||
|
|
||||||
|
#define LARA_MIN_SPECULAR 0.03f
|
||||||
#define LARA_WET_SPECULAR 0.5f
|
#define LARA_WET_SPECULAR 0.5f
|
||||||
#define LARA_WET_TIMER (LARA_WET_SPECULAR / 16.0f) // 4 sec
|
#define LARA_WET_TIMER (LARA_WET_SPECULAR / 16.0f) // 4 sec
|
||||||
|
|
||||||
@@ -2813,10 +2814,10 @@ struct Lara : Character {
|
|||||||
updateWeapon();
|
updateWeapon();
|
||||||
|
|
||||||
if (stand == STAND_UNDERWATER)
|
if (stand == STAND_UNDERWATER)
|
||||||
specular = 0.0f;
|
specular = LARA_MIN_SPECULAR;
|
||||||
else
|
else
|
||||||
if (specular > 0.0f)
|
if (specular > LARA_MIN_SPECULAR)
|
||||||
specular = max(0.0f, specular - LARA_WET_TIMER * Core::deltaTime);
|
specular = max(LARA_MIN_SPECULAR, specular - LARA_WET_TIMER * Core::deltaTime);
|
||||||
|
|
||||||
if (state == STATE_MIDAS_DEATH || state == STATE_MIDAS_USE) {
|
if (state == STATE_MIDAS_DEATH || state == STATE_MIDAS_USE) {
|
||||||
uint32 sparklesMask = getMidasMask();
|
uint32 sparklesMask = getMidasMask();
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
set -e
|
set -e
|
||||||
clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara
|
clang++ -std=c++11 -Os -s -g -marm -march=armv7ve -mtune=cortex-a7 -mfloat-abi=hard -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara
|
||||||
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note
|
||||||
|
@@ -66,7 +66,7 @@ bool sndInit() {
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
// In the perfect world ReedPlayer-Clover process
|
// In the perfect world ReedPlayer-Clover process
|
||||||
// will release ALSA devicbefore app running, but...
|
// will release ALSA device before app running, but...
|
||||||
for (int i = 0; i < 20; i++) { // 20 * 0.1 = 2 secs
|
for (int i = 0; i < 20; i++) { // 20 * 0.1 = 2 secs
|
||||||
sndOut = NULL;
|
sndOut = NULL;
|
||||||
if ((err = snd_pcm_open(&sndOut, "default", SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
|
if ((err = snd_pcm_open(&sndOut, "default", SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
|
||||||
@@ -581,10 +581,10 @@ LOG("start\n");
|
|||||||
|
|
||||||
inputFree();
|
inputFree();
|
||||||
|
|
||||||
//sndFree();
|
Game::deinit();
|
||||||
//Game::deinit();
|
|
||||||
|
|
||||||
eglFree();
|
eglFree();
|
||||||
|
|
||||||
|
sndFree();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -142,9 +142,9 @@ uniform vec4 uFogParams;
|
|||||||
float fog;
|
float fog;
|
||||||
#ifdef UNDERWATER
|
#ifdef UNDERWATER
|
||||||
float d;
|
float d;
|
||||||
if (uViewPos.y < uParam.y)
|
//if (uViewPos.y < uParam.y) // TODO: fix for mediump
|
||||||
d = abs((coord.y - uParam.y) / normalize(vViewVec.xyz).y);
|
// d = abs((coord.y - uParam.y) / normalize(uViewPos.xyz - coord.xyz).y);
|
||||||
else
|
//else
|
||||||
d = length(uViewPos.xyz - coord.xyz);
|
d = length(uViewPos.xyz - coord.xyz);
|
||||||
fog = d * WATER_FOG_DIST;
|
fog = d * WATER_FOG_DIST;
|
||||||
#else
|
#else
|
||||||
@@ -436,7 +436,7 @@ uniform vec4 uFogParams;
|
|||||||
vec3 normal = normalize(vNormal.xyz);
|
vec3 normal = normalize(vNormal.xyz);
|
||||||
|
|
||||||
#ifdef TYPE_ENTITY
|
#ifdef TYPE_ENTITY
|
||||||
float rSpecular = uMaterial.z + 0.03;
|
float rSpecular = uMaterial.z;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OPT_SHADOW
|
#ifdef OPT_SHADOW
|
||||||
|
Reference in New Issue
Block a user