Materials (Metroid Prime): Difference between revisions

>Aruki
>Aruki
Line 644: Line 644:
==== Mode 4/5: Horizontal/Vertical Filmstrip ====
==== Mode 4/5: Horizontal/Vertical Filmstrip ====


These modes can be used to create a filmstrip-like effect, where the texture steps a set distance every so often, rather than the scroll being smoothly interpolated every frame. The same calculation is done for both modes, with the only difference being whether the calculated offset is applied horizontally or vertically. It will only generate a texture matrix. There are four float parameters: ''scale'', ''numFrames'', ''step'', and ''offset''.
These modes can be used to create a filmstrip-like effect. The texture steps a set distance each animation frame, rather than the scroll being smoothly interpolated every game frame. The same calculation is done for both modes, with the only difference being whether the calculated offset is applied to the U or V coordinate. It will only generate a texture matrix. 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.
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.
Anonymous user