Difference between revisions of "Azurik: Rise of Perathia"

From xboxdevwiki
Jump to: navigation, search
m (JayFoxRox moved page Game:Azurik: Rise of Perathia to Azurik: Rise of Perathia without leaving a redirect)
m (image uploaded)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{Game}}
 
{{Game}}
 
 
=== Known tricky behaviour ===
 
=== Known tricky behaviour ===
  
Line 7: Line 6:
 
This game depends on correct GPU rounding. If an emulator suffers from issues with non-exact rounding in the shaders which do the skinning / skeletal animation the character models will be very broken.
 
This game depends on correct GPU rounding. If an emulator suffers from issues with non-exact rounding in the shaders which do the skinning / skeletal animation the character models will be very broken.
  
[[File:http://i.imgur.com/tpmLpjP.png]]
+
[[File:Azurik--Rise-of-Perathia--bugged.png]]
 +
 
  
 
IIRC Code is like:
 
IIRC Code is like:

Latest revision as of 03:17, 27 June 2017

Known tricky behaviour

Skinning code / Shader rounding mode

This game depends on correct GPU rounding. If an emulator suffers from issues with non-exact rounding in the shaders which do the skinning / skeletal animation the character models will be very broken.

Azurik--Rise-of-Perathia--bugged.png


IIRC Code is like:

A0 = c[113].x + c[113].z = 18
*do stuff with c[96+A0] to c[98+A0]*

A0 = c[113].x + c[113].z = 21
*do stuff with c[96+A0] to c[98+A0]* 

A0 = c[113].y * v2
*do stuff with c[96+A0] to c[98+A0]*

c[113] is vec4(15, 765, 3, 0). 765 = 3*255.
v2 is GL_UNSIGNED_BYTE, normalized => v2 = raw/255.
A0 = 765 * raw/255 = 3*raw.

This should all be working, but it's not. NV2A/Vertex Shader does round-to-zero. Behaviour for GLSL and other modern graphic APIs is undefined.. To work around this rounding issue A0 += 1.0/255.0 can be used as a temporary hack