Materials (Metroid Prime): Difference between revisions
Jump to navigation
Jump to search
→Mode 4/5: U/V Offset: i'm good at spelling. also extra details added
>Aruki |
>Aruki (→Mode 4/5: U/V Offset: i'm good at spelling. also extra details added) |
||
Line 615: | Line 615: | ||
==== Mode 4/5: U/V Offset ==== | ==== Mode 4/5: U/V Offset ==== | ||
These modes can be used to scroll U and V independently from each other; they can also be used to have more advanced . The same calculation is done for both modes, with the only difference being whether the calculated offset is applied to U or V. There are four float parameters: ''scale'', ''numFrames'', ''step'', and ''offset''. | |||
The animation is made up of a number of pseudo-frames, where ''step'' controls the amount that the texture scrolls by each frame, and ''numFrames'' sets how many frames are iterated through before resetting back to 0. ''scale'' roughly controls animation playback speed, and ''offset'' modifies the time input value. | |||
<pre>float value = step * scale * (offset + s); | <pre>float value = step * scale * (offset + s); |