Sky Mipmap Val (RW Section)

From GTAModding
Jump to: navigation, search
RW Stream Section
Sky Mipmap Val
0x0110

Sky Mipmap - a section in DFF file, which is an extension for Texture and Texture Native sections. This section is only used in PS2 models / textures (PS2-version of RenderWare engine is called 'Sky').

Structure

This section takes 4 bytes and consists of two parameters - "K" and "L". The "K" and "L" values control the way mipmap levels are selected by the Graphics Synthesizer.

12bits K-value - specifies the distance a polygon needs to be from the camera such that the pixel to texel ratio, 
                 when rendered, is 1:1 assuming the polygon is flat on the screen.
                 It ranges within [-2048 ; 2047]. Divide it by 16 to get a real world coordinate.
 2bits L-value - specifies the angle of inclination between the polygon and the camera viewwindow, 
                 it's a 2-bit value where 0 says the angle is 0 degrees and 3 says it's 90 degrees.