VOOZH about

URL: https://minecraft.wiki/w/Starfield

⇱ Starfield – Minecraft Wiki


Starfield

From Minecraft Wiki
Jump to navigation Jump to search
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 rewriting it.
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

[edit | edit source]

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

[edit | edit source]

Java Edition

[edit | edit source]

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
πŸ‘ Image
πŸ‘ Image

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 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,​[more information needed] 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 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

[edit | edit source]
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
πŸ‘ Image
πŸ‘ Image

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 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 colour texture coordinates. The 16 coordinate pairs form a 4x4 grid, with both coordinates successively taking the values 9⁄16, 11⁄16, 13⁄16, and 15⁄16. 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 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 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 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 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

[edit | edit source]

Java Edition

[edit | edit source]
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πŸ‘ Image
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.
πŸ‘ Image
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 πŸ‘ Image
to πŸ‘ Image
, 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]

Table of visual changes

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

Data changes

[edit | edit source]
21w10a rendering changes
[edit | edit source]

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.

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 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

​[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
[edit | edit source]
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

[edit | edit source]
Pocket Edition
1.0.0alpha 0.17.0.1The starfield effect has been implemented.
πŸ‘ Image
πŸ‘ Image
End portals and end gateways were implemented in this version.

Table of visual differences

[edit | edit source]
Host portal gateway Notes
Windows 11
AMD Radeon RX 7800 XT
πŸ‘ Image
All 16 colors are used
Kubuntu 24.04
AMD Radeon RX 7800 XT
πŸ‘ Image
πŸ‘ Image
All 16 colors are used

Legacy Console Edition

[edit | edit source]
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

[edit | edit source]
New Nintendo 3DS Edition
1.7.10πŸ‘ Image
πŸ‘ Image
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

[edit | edit source]
  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

[edit | edit source]

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Starfield?oldid=3644386"

Navigation menu