mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Cache normals in addition to binormals and tangents
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used. LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
This commit is contained in:
@ -62,6 +62,10 @@ void UpdateVertexArrayPointers();
|
||||
// These arrays are in reverse order.
|
||||
extern std::array<std::array<float, 4>, 3> position_cache;
|
||||
extern std::array<u32, 3> position_matrix_index_cache;
|
||||
// Needed for the game "LIT", which has text that has lighting enabled, but doesn't have normal
|
||||
// vectors. The normals from the last drawn object are used instead.
|
||||
// See https://bugs.dolphin-emu.org/issues/13635
|
||||
extern std::array<float, 4> normal_cache;
|
||||
// Store the tangent and binormal vectors for games that use emboss texgens when the vertex format
|
||||
// doesn't include them (e.g. RS2 and RS3). These too are 4 floats each for SIMD overwrites.
|
||||
extern std::array<float, 4> tangent_cache;
|
||||
|
Reference in New Issue
Block a user