REGoth-project / REGoth

OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
GNU General Public License v3.0
631 stars 62 forks source link

Make REGoth compilable with latest bgfx #251

Closed Kukunin closed 7 years ago

Kukunin commented 7 years ago

Currently we have 3 bugs with this:

screen shot 2017-10-06 at 14 32 45

On other hand - it works under MacOS #241

Kukunin commented 7 years ago

After recompilation of shaders with latest bgfx, the latest result is

image

Drako commented 7 years ago

For whatever reason the PC is missing his right leg xD That is also the case in Gothic 1 btw.

ataulien commented 7 years ago

Found the issue causing the missing legs!

In vs_skinned.sc, put #define BGFX_CONFIG_MAX_BONES 100, before including common.h, so it's like this:

 // ...

#define LOCAL_POSITIONS_1 a_texcoord1
#define LOCAL_POSITIONS_2 a_texcoord2
#define LOCAL_POSITIONS_3 a_texcoord3
#define LOCAL_POSITIONS_4 a_texcoord4
#define BONE_INDICES a_texcoord5
#define WEIGHTS a_texcoord6

#define BGFX_CONFIG_MAX_BONES 100

#include "../common/common.sh"
#include "tools.sh"

uniform vec4 u_color;

// ...
Kukunin commented 7 years ago

Pushed the fix. Hopefully, after CI is done we can merge it

ataulien commented 7 years ago

Works on my machine (tm)