Mineuniverse

Starfield

Starfield is a unique graphical effect used for rendering certain features related to the End.

18 min read Updated 1 views
Visuals
Advertisement Remove ads with Premium →
Contents (11)
  1. Use cases
  2. How it is rendered
  3. Java Edition
  4. Bedrock Edition
  5. History
  6. Java Edition
  7. Bedrock Edition
  8. Legacy Console Edition
  9. New Nintendo 3DS Edition
  10. Notes
  11. References
This topic is named by the community.
An official name has not been given. Please update the name if confirmed by reliable sources.

Starfield is a unique graphical effect used for rendering certain features related to the End.

Use cases

Starfield effects are used for the following:

Falling block entities of the End portal and End gateway do not render the starfield effect, and it seems highly unlikely (although unproven) that moving piston blocks would either.[1]

How it is rendered

Java Edition

The rendering of the starfield effect has changed several times throughout the game's history.

There are two subtly different gateway effects, referred to by the end_cube special model type as portal (used for end portal blocks, the dimension loading screens for entering and exiting the End, and the credits sequence and preceding poem) and gateway, used specifically for end gateways. The latter renders an extra layer of blue pixels which are absent from the former, which can be seen by placing the two blocks next to each other; blue pixels will disappear when they migrate to the space where the end portal is present. See later in this section for a technical explanation of the difference.

Two different texture files are utilized in generating the starfield effect:

entity/end_portal/end_portal.png environment/end_sky.png

The "End sky" texture, which is indeed the same texture used for the actual End sky, is used as the "background" texture: it is sampled using screen-projected coordinates and multiplied by
 #06191C
. The shader uses the projected screen-space y-coordinate directly as the vertical texture coordinate; because the screen-projected vertical coordinate increases upward while the texture image is displayed with its vertical axis running downward, the background texture appears vertically mirrored.

The "End portal" texture is sampled in multiple layers on top of this background. Each layer uses a different color multiplier, scale, rotation, fixed horizontal offset, and time-based vertical offset. In the fragment shader, the RGB results of the layers are combined additively before the final color is output with full opacity. The End portal uses 15 layers of the "End portal" texture, while the End gateway uses 16 layers. The first 15 layers are shared between both effects, while the End gateway has an additional layer using
 #1550A9
.

The color values used by the layers are as follows. Index 0 is also used for the "End sky" background, but the velocity listed for index 0 applies only to the first layer of the "End portal" texture. The End portal uses indices 0 through 14, while the End gateway uses indices 0 through 15. The Velocity column gives the rate at which the time-based vertical offset increases. In the current Windows behavior, this is also the apparent downward velocity of the layer. In the pre-25w07a behavior, where the apparent travel direction follows each layer's rotation, the same listed velocity is transformed by the layer's rotation and scale.

Index Velocity Rotation Scale Color Used by
portal gateway
0 4⁄24000 20° 8.5
 #06191C
✓ ✓
1 5⁄24000 44° 8
 #031817
✓ ✓
2 6⁄24000 72° 7.5
 #071A1A
✓ ✓
3 7⁄24000 104° 7
 #0C1C1D
✓ ✓
4 8⁄24000 140° 6.5
 #111E19
✓ ✓
5 9⁄24000 180° 6
 #101620
✓ ✓
6 10⁄24000 224° 5.5
 #161D2A
✓ ✓
7 11⁄24000 272° 5
 #192717
✓ ✓
8 12⁄24000 324° 4.5
 #1B2132
✓ ✓
9 13⁄24000 20° 4
 #191C30
✓ ✓
10 14⁄24000 80° 3.5
 #222326
✓ ✓
11 15⁄24000 144° 3
 #123E3C
✓ ✓
12 16⁄24000 212° 2.5
 #322437
✓ ✓
13 17⁄24000 284° 2
 #0C5052
✓ ✓
14 18⁄24000 0° 1.5
 #34634D
✓ ✓
15 19⁄24000 80° 1
 #1550A9
× ✓

For the nth layer, where n starts at 1 and equals the table index plus 1, the horizontal offset is 17⁄n, the rotation angle is (n×n×4321+n×9)×2 degrees,​ and the scale is (4.5-n⁄4)×2. The vertical offset is (2+n⁄1.5)×(GameTime×1.5). Since GameTime increases by 1⁄24000 per game tick, the Velocity value listed in the table is (3+n)⁄24000. In unaffected rendering behavior, the Rotation value gives the apparent travel direction, while the apparent travel velocity is the listed Velocity divided by the listed Scale.

On some AMD Windows systems, the layers appear to move vertically downward instead of following the directions listed in the table. This behavior is unintentional. On some systems, only OpenGL exhibits this behavior, whereas the Vulkan renderer does not, although on other systems both are affected. It does not affect OpenGL on macOS, Linux, or when using Nvidia graphics hardware.[2]

The starfield effect is completely constant regardless of view: while moving and rotating the camera will change the position of the object using the starfield effect itself on screen, the starfield itself will remain fixed in place. In effect, anything using the starfield effect effectively creates what can be seen as a "hole" in the world, behind which the starfield rests. The shape of the starfield also changes with the window size, although this is presumably not intentional.[3]

Bedrock Edition

The starfield effect in Bedrock Edition is rendered using a layered parallax system.

For End portals, the effect consists of 17 overlapping horizontal quadrilateral layers with identical positions, dimensions, and depths. Each layer covers the full horizontal area of a block and consists of 2 triangles.

For End gateways, the effect consists of 17 overlapping layers with identical positions, dimensions, and depths. Each cube layer occupies a full block space and consists of 6 faces and 12 triangles.

In both effects, one layer forms an opaque base layer, while the remaining 16 render the pixels making up the starfield. The geometry of the 17 layers overlaps exactly within each effect; the depth and parallax of the starfield are produced by the different texture coordinates and layer parameters used by each layer.

Two different texture files are utilized in generating the effect:

textures/entity/end_portal.png textures/environment/end_portal_colors.png

The end_portal.png texture supplies the starfield pattern, while the end_portal_colors.png texture supplies the colors used by the individual starfield layers. Both textures use nearest-neighbor filtering and wrap addressing on both texture-coordinate axes, so coordinates outside the texture range continue sampling from the opposite side.

The opaque base layer has a layer parameter of 1. In this case, the pixel shader enters the base-layer branch and generates the output color from the current fog color and fog factor. At positions unaffected by fog, the fog factor is 0, causing the layer to appear black; as the fog factor increases, the color of the base layer approaches the fog color of the scene.

The remaining 16 layers render the starfield pixels and are indexed from 0 through 15. Their layer parameters are 239⁄255, 223⁄255, and 207⁄255, decreasing by 16⁄255 for each subsequent layer until 15⁄255 at index 14; the layer parameter at index 15 is 0.

Each starfield layer has a fixed set of color texture coordinates. The 16 coordinate pairs form a 4×4 grid, with both coordinates successively taking the values 9⁄16, 11⁄16, 13⁄16, and 15⁄16. With nearest-neighbor filtering, these coordinates fall within the bottom-right 2×2-pixel region of the color texture, so four colors are used, each by four starfield layers.

The parameters used by the starfield layers are as follows. The Rotation column gives the exact angle in radians, reduced to the range from 0 to 2π:

Index Layer parameter Rotation Virtual depth Layer brightness Color texture coordinates Color
0 239⁄255 508⁄357π 7648⁄255 16⁄255 (9⁄16,9⁄16)
 #698C84
1 223⁄255 710⁄357π 7136⁄255 32⁄255 (11⁄16,9⁄16)
 #698C84
2 207⁄255 66⁄119π 2208⁄85 48⁄255 (13⁄16,9⁄16)
 #2AB4B5
3 191⁄255 400⁄357π 6112⁄255 64⁄255 (15⁄16,9⁄16)
 #2AB4B5
4 175⁄255 86⁄51π 1120⁄51 80⁄255 (9⁄16,11⁄16)
 #698C84
5 159⁄255 30⁄119π 1696⁄85 96⁄255 (11⁄16,11⁄16)
 #698C84
6 143⁄255 292⁄357π 4576⁄255 112⁄255 (13⁄16,11⁄16)
 #2AB4B5
7 127⁄255 494⁄357π 4064⁄255 128⁄255 (15⁄16,11⁄16)
 #2AB4B5
8 111⁄255 232⁄119π 1184⁄85 144⁄255 (9⁄16,13⁄16)
 #53B884
9 95⁄255 184⁄357π 608⁄51 160⁄255 (11⁄16,13⁄16)
 #53B884
10 79⁄255 386⁄357π 2528⁄255 176⁄255 (13⁄16,13⁄16)
 #488D9D
11 63⁄255 28⁄17π 672⁄85 192⁄255 (15⁄16,13⁄16)
 #488D9D
12 47⁄255 76⁄357π 1504⁄255 208⁄255 (9⁄16,15⁄16)
 #53B884
13 31⁄255 278⁄357π 992⁄255 224⁄255 (11⁄16,15⁄16)
 #53B884
14 15⁄255 160⁄119π 32⁄17 240⁄255 (13⁄16,15⁄16)
 #488D9D
15 0 0 0 1 (15⁄16,15⁄16)
 #488D9D

For a starfield layer with a layer parameter of p, the virtual depth is 32p, the rotation angle of the texture coordinates is 32p×5π⁄7 radians, and the layer brightness is 1-p.

The RGB components of the vertex color encode the direction of the current block face, while the alpha component stores the layer parameter. The vertex shader uses the vertex position, block-face direction, viewpoint position, and virtual depth to calculate the position projected from the viewpoint onto a virtual sampling plane. The actual geometry of all 17 layers overlaps exactly, but the virtual sampling planes corresponding to the layers lie at different depths, producing multiple levels of parallax as the camera moves.

The virtual sampling position is then converted into two-dimensional coordinates according to the direction of the block face and scaled to 1⁄16 of its original size. The coordinates are rotated by the rotation angle of the layer, then offset by 32p in the same direction. The time value supplied by the renderer is divided by 256 and added to the second texture coordinate, causing the starfield pattern to move continuously. All layers use the same time increment, while their different rotation angles and virtual depths produce different apparent directions of travel and degrees of parallax.

The time value supplied by the renderer increases in seconds, so the time offset increases by 1⁄256 of a texture-coordinate unit per second. The parallax texture uses wrap addressing; with the camera position and other rendering parameters kept unchanged, the starfield animation returns to the same texture phase every 256 seconds.

The output color of an ordinary starfield layer is obtained by multiplying the color texture, parallax texture, layer brightness, and fog attenuation component-wise. If the layer parameter is p and the fog factor is f, the color of the layer is the component-wise product of the color texture, the parallax texture, 1-p, and 1-f.

The blend state causes the base layer to replace the existing color in the framebuffer, after which the 16 starfield layers are added successively. Different graphics backends may use different output alpha values and destination blend factors to produce the same color-compositing result.

The effect uses depth testing and depth writing, with the depth comparison function set to less than or equal. As all 17 layers of each effect use the same geometry and depth, each layer can pass the test at equal depth and take part in the final composition.

History

Java Edition

Java Edition Beta
1.8Pre-release Added misc/particlefield.png, though without any apparent use at this point.
Java Edition
1.0.0Beta 1.9 Prerelease 3 The starfield effect now exists.
This initial starfield effect differs considerably from the effect seen in current versions: it changes depending on camera position and movement,​ and the sky texture repeats instead of only being used once.​ Coloration also appears to be different at this point.​
It is used by the End portal block, though only when viewed from above.
Added misc/tunnel.png, which is used for the background of the starfield effect.
misc/particlefield.png is now used for the foreground planes of the starfield effect.
1.3.112w23a misc/tunnel.png has changed from to , thus modifying the appearance of the starfield.
1.6.113w24a misc/particlefield.png has been renamed and moved to assets/minecraft/textures/entity/end_portal.png.
misc/tunnel.png has been renamed and moved to assets/minecraft/textures/environment/end_sky.png.
1.915w31a End gateways, the second block to utilize a starfield effect, have been added. Much like End portals, this effect depends on the camera position.
The top face resembles that of the End portal, but the side faces are noticeably distorted.​ How the bottom face looks is unknown.
15w33a End gateways now use a different starfield effect from End portals: it is fixed with respect to the camera.
The side faces of the block are no longer distorted, and you can no longer easily tell where the edges of the cube are at all.
This "fixed position" animation may sometimes appear jittery, and may not move at all on some operating systems.​
The End sky texture used by the fixed starfield is rotated,​ tiled, and does not move with the camera. It translates over time as the upper layers do.
End gateways are entirely unaffected by fog.
1.1016w20a The end portal background color has been changed from
 #1A1A1A
to
 #041113
.
The end gateway background color has been changed from
 #262626
to
 #06191C
.
? There is now a separate layer 0 in the starfield, which shares the color value of the background, but is rendered with the portal texture rather than the sky texture.
1.1116w40a End portal blocks now use the same "fixed" starfield effect that End gateways use, though without the extra blue particles gateways have.[4]
The non-fixed version of the starfield can therefore be considered effectively removed.
1.11.116w50a End portals are no longer affected bizarrely by fog - they now are obscured by it more logically. End gateways still remain completely unaffected by it.
1.1317w43a The starfield animation now always appears smooth, rather than jittery or frozen as it sometimes was before this version.​
1.1519w39a Starfields rendered by blocks are now rendered in the wrong position, or sometimes not at all.[5]
19w40a The above bug has been fixed.
End gateway blocks are now affected by fog correctly, and end portal blocks are once again affected by fog correctly.
19w41a End portal and end gateway blocks are no longer obscured by fog.
1.1721w10a Only one instance of the "sky" texture is now rendered, and it is stretched across the entire background,[6] upside down,[7] unlike being repeated as it previously was.​
The foreground particles appear larger in this version than previously.
21w11a The foreground particles have seemingly been shrunk down to their pre-21w10a sizes.[note 1] The background texture change persists.
21w13a The starfield is now also rendered on the bottom of End portals, rather than only the top.
1.20.524w09a The starfield is now used as the background of the End Poem and credit sequence.
Pre-Release 2 The starfield is now used as the background when entering or leaving the End.
1.21.525w07a On some Windows devices (seemingly those with an AMD graphics processor), the starfield now only moves down, rather than in different directions as it previously did.[8] Devices with an Nvidia processors and those running macOS or Linux appear unchanged from the previous version.
Starfield blocks are now affected by fog correctly.[9]
26.1snap2 assets/minecraft/textures/entity/end_portal.png has been renamed and moved to assets/minecraft/textures/entity/end_portal/end_portal.png.
Pre-Release 1 Added the end_cube special model type, which can be used to create items which render the starfield effect.
End portal and End gateway blocks held by endermen, displayed in minecarts or set as the displayed block of a lit TNT entity will now render the starfield, rather than being invisible as they were previously.[10]
In the specific case of end portals, the starfield is also displayed on the sides, rather than only the bottom and top as is the case for the placed block form.
26.3snap1 Starfield objects now show the glowing outline as block displays,[11] when held by an enderman,[12] when in a minecart,[13] when set as TNT's displayed block ID,[14] and as the item form of any end_cube item in the world.[15]

Table of visual changes

Parallax
Versions portal gateway Changes
Beta 1.9 Prerelease 3
to
12w22a
- Portal introduction
12w23a
to
1.8.9
End Sky texture change
15w31a
to
15w32c
Gateway introduction
15w33a
to
1.9.4
- Gateway now camera-independent
16w20a
to
16w39c
The starfield is darker and greener
Parallax starfield no longer exists from 16w40a onward
Fixed
Versions portal gateway Changes
15w33a
to
1.9.4
- Fixed starfield added, used by end gateway
16w20a
to
16w39c
The starfield is darker and greener
16w40a
to
21w08b
Portal now camera-independent
21w10a Background now stretched instead of repeating, particle size increased
21w11a
to
present
Particle size reverted
Blocks
Versions portal gateway Changes
Beta 1.9 Prerelease 3
to
12w22a
- Portal introduction
12w23a
to
1.8.9
- End Sky texture change
15w31a
to
15w32c
Gateway introduction
15w33a
to
1.9.4
Gateway now camera-independent
16w20a
to
16w39c
The starfield is darker and greener
16w40a
to
21w08b
Portal now camera-independent
21w10a Background now stretched instead of repeating, particle size increased
21w11a
to
present
Particle size reverted

Data changes

21w10a rendering changes

From 15w33a to 21w08b, the starfield effect was defined in the game's code. 21w10a introduced resource-pack-configurable core shaders, with the shader file rendertype_end_portal containing the starfield's definition.

Before

The background layer, rather than being a fixed background, was treated much more similarly to the starfield particle layers on top of it; it was scaled, tessellated, and would move over time. That is, the "layer" furthest back used end_sky rather than end_portal, but otherwise behaved as the end_portal layers do, being rotated, repeated and gradually moving.

Rather than being explicitly defined, the set of colors used were generated using a fixed numeric seed (31100).​ The same set of colors were generated on every session. End portals and end gateways used different color multipliers.​

Index Texture Velocity Rotation Scale Color Used by
portal gateway
0 end_sky 4⁄24000 20° 4.25
 #06191C
✓ ✓
1 end_portal 5⁄24000 44° 4
 #031817
✓ ✓
2 end_portal 6⁄24000 72° 3.75
 #071A1A
✓ ✓
3 end_portal 7⁄24000 104° 3.5
 #0C1C1D
✓ ✓
4 end_portal 8⁄24000 140° 3.25
 #111E19
✓ ✓
5 end_portal 9⁄24000 180° 3
 #101620
✓ ✓
6 end_portal 10⁄24000 224° 2.75
 #161D2A
✓ ✓
7 end_portal 11⁄24000 272° 2.5
 #192717
✓ ✓
8 end_portal 12⁄24000 324° 2.25
 #1B2132
✓ ✓
9 end_portal 13⁄24000 20° 2
 #191C30
✓ ✓
10 end_portal 14⁄24000 80° 1.75
 #222326
✓ ✓
11 end_portal 15⁄24000 144° 1.5
 #123E3C
✓ ✓
12 end_portal 16⁄24000 212° 1.25
 #322437
✓ ✓
13 end_portal 17⁄24000 284° 1
 #0C5052
✓ ✓
14 end_portal 18⁄24000 0° 0.75
 #34634D
✓ ✓
15 end_portal 19⁄24000 80° 0.5
 #1550A9
× ✓
After

​

Comparison

For a 128×128 end_sky.png which is completely white in the center, and has a one-pixel-thick red border around the edges, we get the following results (recolored to the input texture) for a 1024×1024 window:

21w11a value changes
Index Scale
21w10a 21w11a
0 4.25 8.5
1 4 8
2 3.75 7.5
3 3.5 7
4 3.25 6.5
5 3 6
6 2.75 5.5
7 2.5 5
8 2.25 4.5
9 2 4
10 1.75 3.5
11 1.5 3
12 1.25 2.5
13 1 2
14 0.75 1.5
15 0.5 1

Bedrock Edition

Pocket Edition
1.0.0alpha 0.17.0.1 The starfield effect has been implemented.
End portals and end gateways were implemented in this version.

Table of visual differences

Host portal gateway Notes
Windows 11
AMD Radeon RX 7800 XT
All 16 colors are used
Kubuntu 24.04
AMD Radeon RX 7800 XT
End portals only use even colors

Legacy Console Edition

Legacy Console Edition
Xbox 360Xbox OnePS3PS4PS VitaWii USwitch
TU7CU11.001.001.00Patch 11.0.1 The starfield effect has been implemented alongside the end portal block. However, due to limited documentation at this time, it is unclear as to whether the starfield effect is a perfect match to any iteration of Java Edition's or if it looks different in some way.
TU46CU361.381.381.38Patch 15 End gateways have been implemented, which also use the starfield effect. It is also unknown if this matches Java Edition 1.9's or is somehow different.
TU54CU441.521.521.52Patch 241.0.4 The starfield effect used by the end portal is now fixed to the screen as end gateways are much like in Java Edition. It is still not known if it appears identical to said edition or has its own unique differences.

New Nintendo 3DS Edition

New Nintendo 3DS Edition
1.7.10 The starfield has been implemented alongside the end portal and end gateway blocks. It looks much different compared to other editions; the portal texture does not appear to be colored and instead remains white. How exactly it is rendered is unknown.

Notes

  1. ↑ Specifically, a line in rendertype_end_portal.fsh was changed from (4.5-n/4) to (4.5-n/4)×2. Multiplying by 2 has effectively multiplied the size of each layer by 1⁄2. See #21w11a value changes for a comparison.
  2. ↑ Not depicted: gradual movement

References

Advertisement Remove ads with Premium →

More in Visuals

View all 30 →
Ray TracingRay Tracing or RTX is a graphics mode that improves the visual fidelity in Minecraft with physically based rendering and real-time lighting simulation…RenderingRendering refers to the process of converting digital information to a form which can be displayed via a visual output such as a computer monitor. This is…Screen effectsScreen effects encompass a variety of effects applied alongside or beneath the heads-up display as augmentations to the player's point of view as a method…SkySkyThe sky is a visual feature of Minecraft worlds rendered behind all objects in the game. It changes color depending on the time of day, biome, weather…Spawn Egg colorsPrior to the Spring to Life game drop, spawn eggs used textures that were accordingly colored to match each mob. While Programmer Art returns the old…StarsStarsStars are celestial bodies that appear in the night sky of the Overworld.SunSunThe sun is a celestial body that provides sky light for the Overworld.Vibrant VisualsVibrant VisualsVibrant Visuals is a graphics mode that aims to improve the visual looks of Minecraft by adding directional lighting, physically based textures…
Advertisement Remove ads with Premium →

Related mods

Starfield Pastoral Starfield Pastoral Mod · 11.3K downloads
Explore the Minecraft Wiki
Blocks, items, mobs, biomes and game mechanics — all in one place.
Wiki home