Functions | |
| void | RtMipKClumpCalculateKValues (RpClump *clump, RwCamera *camera) |
| void | RtMipKWorldCalculateKValues (RpWorld *world, RwCamera *camera) |
The set "K" value is calculated as the average "K" value for all the triangles using a RwTexture.
So we first calculate the screen texel ratio by:
screen texel ratio := (video mode width * video mode height)
----------------------------------------------------
((view window width * 2) * (view window height * 2))
Then the triangle texel area is calculated, by calculating the screen pixel area per triangle:
screen space pixel area := triangle area * screen texel ratio
Then the pixel to texel ratio for the triangle:
pixel to texel ratio := screen space pixel area * texel area
The root of this the pixel to texel ratio is added to the sum for all the triangles referencing the texture.
Finally we calculate the average "K" value by:
average "K" := - ( log( sum / count ) / log(2) )
This MipMap "K" value is then stored in the texture.
|
||||||||||||
|
RtMipKClumpCalculateKValues computes the Sky specific "K" values for textures used in a clump's atomics, based on the current video mode and the view window of the specified camera. RtMipKClumpCalculateKValues uses the current texture dictionary to get the textures to process. So, set the correct texture dictionary to be the current texture dictionary before calling this function.
|
|
||||||||||||
|
RtMipKWorldCalculateKValues computes the Sky specific "K" values for textures used in a world, based on the current video mode and the view window of the specified camera. RtMipKWorldCalculateKValues uses the current texture dictionary to get the textures to process. So, set the correct texture dictionary to be the current texture dictionary before calling this function.
|
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:14 2004.
Send Feedback