The animation for gears was generated using two predefined image files - misc/gear.png for the rotating gear and misc/gearmiddle.png for the stationary center.įluid textures are generated via 3-layer non-deterministic cellular automata, which modify the RGB and alpha values of the texture accordingly, along with shifting of the texture to emulate flowing. If your Nether portal's colors appear to be off, apply a gamma correction of 2.2.Ĭode which generates the frames of the gear texture can be found here. Note that Minecraft performs almost all of its color calculations in linear space, and only applies gamma correction near the end of rendering. To generate a frame of the Nether portal animation:Īssume width = 16, height = 16, and frame_count = 32. Nether portals ĭue to the large number of Atan2 and Sine operations, all of the animation frames for the portal block are generated once at-startup, with each frame's data being stored in an array of all the frames.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |