Wiki ArticlePages with unofficial namesArticles needing rewriteVerify for Bedrock EditionInformation needed

Starfield

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

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]

This topic is named by the community.
 
An official name has not been given. Please update the name if confirmed by reliable sources.
This article needs to be rewritten.
 [discuss]
It may contain inappropriate or inaccurate information. Please help us by .
Reason: Replace British English words with American English words

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 utilised 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 upwards while the texture image is displayed with its vertical axis running downwards, 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 colour 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 colour 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 colour 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 behaviour, this is also the apparent downward velocity of the layer. In the pre-25w07a behaviour, 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 Colour Used by
portal gateway
0 424000 20° 8.5
 #06191C
1 524000 44° 8
 #031817
2 624000 72° 7.5
 #071A1A
3 724000 104° 7
 #0C1C1D
4 824000 140° 6.5
 #111E19
5 924000 180° 6
 #101620
6 1024000 224° 5.5
 #161D2A
7 1124000 272° 5
 #192717
8 1224000 324° 4.5
 #1B2132
9 1324000 20° 4
 #191C30
10 1424000 80° 3.5
 #222326
11 1524000 144° 3
 #123E3C
12 1624000 212° 2.5
 #322437
13 1724000 284° 2
 #0C5052
14 1824000 1.5
 #34634D
15 1924000 80° 1
 #1550A9
×

For the nth layer, where n starts at 1 and equals the table index plus 1, the horizontal offset is 17n, the rotation angle is (n×n×4321+n×9)×2 degrees,​[more information needed] and the scale is (4.5-n4)×2. The vertical offset is (2+n1.5)×(GameTime×1.5). Since GameTime increases by 124000 per game tick, the Velocity value listed in the table is (3+n)24000. In unaffected rendering behaviour, 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 downwards instead of following the directions listed in the table. This behaviour is unintentional. On some,sustems, only OpenGL exhibits this behaviour, 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

This section is missing information about: Colour reproduction may vary slightly between different devices (https://discord.com/channels/447104142729674753/449243256849563648/1512793138526294156)
 
Please expand the section to include this information. Further details may exist on the talk page.

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 utilised 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 colours used by the individual starfield layers. Both textures use nearest-neighbour 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 colour from the current fog colour 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 colour of the base layer approaches the fog colour of the scene.

The remaining 16 layers render the starfield pixels and are indexed from 0 through 15. Their layer parameters are 239255, 223255, and 207255, decreasing by 16255 for each subsequent layer until 15255 at index 14; the layer parameter at index 15 is 0.

Each starfield layer has a fixed set of colour texture coordinates. The 16 coordinate pairs form a 4x4 grid, with both coordinates successively taking the values 916, 1116, 1316, and 1516. With nearest-neighbour filtering, these coordinates fall within the bottom-right 2x2-pixel region of the colour texture, so four colours are used,[verify] 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 Colour texture coordinates Colour[verify]
0 239255 508357π 7648255 16255 (916,916)
 #698C84
1 223255 710357π 7136255 32255 (1116,916)
 #698C84
2 207255 66119π 220885 48255 (1316,916)
 #2AB4B5
3 191255 400357π 6112255 64255 (1516,916)
 #2AB4B5
4 175255 8651π 112051 80255 (916,1116)
 #698C84
5 159255 30119π 169685 96255 (1116,1116)
 #698C84
6 143255 292357π 4576255 112255 (1316,1116)
 #2AB4B5
7 127255 494357π 4064255 128255 (1516,1116)
 #2AB4B5
8 111255 232119π 118485 144255 (916,1316)
 #53B884
9 95255 184357π 60851 160255 (1116,1316)
 #53B884
10 79255 386357π 2528255 176255 (1316,1316)
 #488D9D
11 63255 2817π 67285 192255 (1516,1316)
 #488D9D
12 47255 76357π 1504255 208255 (916,1516)
 #53B884
13 31255 278357π 992255 224255 (1116,1516)
 #53B884
14 15255 160119π 3217 240255 (1316,1516)
 #488D9D
15 0 0 0 1 (1516,1516)
 #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×7 radians, and the layer brightness is 1-p.

The RGB components of the vertex colour 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 116 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 1256 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 colour of an ordinary starfield layer is obtained by multiplying the colour texture, parallax texture, layer brightness, and fog attenuation component-wise. If the layer parameter is p and the fog factor is f, the colour of the layer is the component-wise product of the colour texture, the parallax texture, 1-p, and 1-f.

The blend state causes the base layer to replace the existing colour 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 colour-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

This section is missing information about: These versions changed the relevant shader files and may be worth investigating to see if those changes are at all relevant to a differing visual outcome (I think they just might be routine maintenance due to format changes though, besides 25w07a which added fog):
  • 24w05a
  • 24w21a
  • 24w34a
  • 25w07a
  • 25w16a
  • 25w19a
  • 25w37a
 
Please expand the section to include this information. Further details may exist on the talk page.
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 3The 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,​[more information needed] and the sky texture repeats instead of only being used once.​[more information needed] Coloration also appears to be different at this point.​[more information needed]
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.112w23amisc/tunnel.png has changed from to , thus modifying the appearance of the starfield.
1.6.113w24amisc/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.915w31aEnd 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[verify] that of the End portal, but the side faces are noticeably distorted.​[more information needed] How the bottom face looks is unknown.
15w33aEnd 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.​[more information needed]
The End sky texture used by the fixed starfield is rotated, squished, and repeated. It does not move with the camera or with time.​[more information needed]
End gateways are entirely unaffected by fog.
1.1016w20aThe end portal background colour has been changed from
 #1A1A1A
to
 #041113
.
The end gateway background colour has been changed from
 #262626
to
 #06191C
.
?There is now a separate layer 0 in the starfield, which shares the colour value of the background, but is rendered with the portal texture rather than the sky texture.
1.1116w40aEnd portal blocks now use the same "fixed" starfield effect that End gateways use, though without the extra blue particles gateways have.
The non-fixed version of the starfield can therefore be considered effectively removed.
1.11.116w50aEnd 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.1317w43aThe starfield animation now always appears smooth, rather than jittery or frozen as it sometimes was before this version.​[more information needed]
1.1519w39aStarfields rendered by blocks are now rendered in the wrong position, or sometimes not at all.[4]
19w40aThe 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.
19w41aEnd portal and end gateway blocks are no longer obscured by fog.
1.1721w10aOnly one instance of the "sky" texture is now rendered, and it is stretched across the entire background, unlike being repeated as it previously was.​[more information needed]
The foreground particles appear larger in this version than previously.
21w11aThe foreground particles have seemingly been shrunk down to their pre-21w10a sizes.[note 1][verify] The background texture change persists.
21w13aThe starfield is now also rendered on the bottom of End portals, rather than only the top.
1.20.524w09aThe starfield is now used as the background of the End Poem and credit sequence.
Pre-Release 2The starfield is now used as the background when entering or leaving the End.
1.21.525w07aOn 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.[5] 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.[6]
26.1snap2assets/minecraft/textures/entity/end_portal.png has been renamed and moved to assets/minecraft/textures/entity/end_portal/end_portal.png.
Pre-Release 1Added 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.[7]
Upcoming Java Edition
26.3snap1Starfield objects now show the glowing outline as block displays,[8] when held by an enderman,[9] when in a minecart,[10] when set as TNT's displayed block ID,[11] and as the item form of any end_cube item in the world.[12]

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[verify] 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 colours used were generated using a fixed numeric seed (31100).​[more information needed] The same set of colours were generated on every session. End portals and end gateways used different colour multipliers.​[more information needed]

Index Texture Velocity Rotation Scale Colour Used by
portal gateway
0 end_sky 424000 20° 4.25
 #06191C
1 end_portal 524000 44° 4
 #031817
2 end_portal 624000 72° 3.75
 #071A1A
3 end_portal 724000 104° 3.5
 #0C1C1D
4 end_portal 824000 140° 3.25
 #111E19
5 end_portal 924000 180° 3
 #101620
6 end_portal 1024000 224° 2.75
 #161D2A
7 end_portal 1124000 272° 2.5
 #192717
8 end_portal 1224000 324° 2.25
 #1B2132
9 end_portal 1324000 20° 2
 #191C30
10 end_portal 1424000 80° 1.75
 #222326
11 end_portal 1524000 144° 1.5
 #123E3C
12 end_portal 1624000 212° 1.25
 #322437
13 end_portal 1724000 284° 1
 #0C5052
14 end_portal 1824000 0.75
 #34634D
15 end_portal 1924000 80° 0.5
 #1550A9
×
After

[more information needed]

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.1The 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 colours

Legacy Console Edition

This section is missing information about: TU14 changed the end sky texture, but I don't know if the end portal block actually uses it in this edition
 
Please expand the section to include this information. Further details may exist on the talk page.
Legacy Console Edition
Xbox 360Xbox OnePS3PS4PS VitaWii USwitch
TU7CU11.001.001.00Patch 11.0.1The 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 15End 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.4The 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 12. See #21w11a value changes for a comparison.
  2. Not depicted: gradual movement

References