Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Starfield: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{No navbox}}
{{conjecture}}
{{Rewrite|Replace British English words with American English words}}
'''Starfield''' is a unique graphical effect used for rendering certain features related to [[Minecraft:the End]].
'''Starfield''' is a unique graphical effect used for rendering certain features related to [[Minecraft:the End]].


Line 5: Line 6:
Starfield effects are used for the following:
Starfield effects are used for the following:


* [[Minecraft:End Portal (block)|End portal]]
* {{BlockLink|link=End Portal (block)|End portal}}
* [[Minecraft:End Gateway (block)|End gateway]]
* {{BlockLink|link=End Gateway (block)|End gateway}}
* [[Minecraft:Endermen]] holding End portals or End gateways
* [[Minecraft:Endermen]] holding End portals or End gateways{{verify|edition=bedrock}}
* [[Minecraft:Minecart]]s with custom-displayed End portal or End gateway blocks
* [[Minecraft:Minecart]]s with custom-displayed End portal or End gateway blocks{{verify|edition=bedrock}}
* Lit [[Minecraft:TNT]] entities set to display as End portals or End gateways
* Lit [[Minecraft:TNT]] entities set to display as End portals or End gateways{{verify|edition=bedrock}}
* Loading screen when entering or leaving the End
* [[Minecraft:Block display]] entities set to display as End portals or End gateways{{only|java}}
* [[Minecraft:End Poem]] background screen
* [[Minecraft:Background]] in the [[Minecraft:credit sequence]], [[Minecraft:End poem]], and loading screen when entering or leaving the End{{only|je}}
* [[Minecraft:Credit sequence]] background screen
* Items using the {{code|end_cube}} [[Minecraft:Items model definition#special model types|special model type]] in a resource pack{{only|java}}
* Items using the "end_cube" [[Minecraft:Items model definition#special model types|special model type]] in a resource pack


[[Minecraft:Falling block]] entities of the End portal and End gateway do not render the starfield effect, and it seems highly unlikely (although unproven) that [[Minecraft:moving piston]] blocks would either.<ref>{{bug|MC-308379}}</ref>
[[Minecraft:Falling block]] entities of the End portal and End gateway do not render the starfield effect, and it seems highly unlikely (although unproven) that [[Minecraft:moving piston]] blocks would either.<ref>{{bug|MC-308379}}</ref>
Line 20: Line 20:


=== ''Java Edition'' ===
=== ''Java Edition'' ===
{{update|It has been verified that the starfield effects of the End gateway/portal are not the same in 25w06a and 25w07a: in 25w06a, they use a random walk, while in 25w07a, they move vertically downwards, and the 25w07a behaviour is the current behaviour. Separate JE4 screenshots may also be needed.<br>{{Animate|25w06a Starfield.png;25w07a Starfield.png|120px}}|section=1}}
The rendering of the starfield effect has changed several times throughout the game's history.


The rendering of the starfield effect has changed several times throughout the game's history; the following is present as of [[Minecraft:Java Edition 21w10a]].
There are two subtly different gateway effects, referred to by the {{code|end_cube}} special model type as {{code|portal}} (used for end portal blocks, the dimension loading screens for entering and exiting the End, and the credits sequence and preceding poem) and {{code|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:
Two different texture files are utilized in generating the starfield effect:


{| class="wikitable" style="text-align:center; margin: auto;"
{| class="wikitable" style="text-align:center; margin: auto;"
| "End Portal" texture
| <small>{{code|entity/end_portal/end_portal.png}}</small>
| "End Sky" texture
| {{code|environment/end_sky.png}}
|-
|-
| {{pximg|End Portal (texture) JE1.png|256px}}
| {{pximg|End Portal (texture) JE1.png|256px}}
Line 34: Line 34:
|}
|}


The "End sky" texture, which is indeed the same texture used for the actual [[Minecraft:End sky]], is used as the "background" texture: it is drawn at the very back, stretched to fit the whole screen, and flipped vertically.{{info needed|Is it multiplied by any color values?}} The "End portal" texture is drawn multiple times{{info needed|how many distinct times?}} on top of this background,{{info needed|what blend mode is used, if any?}} multiplied by a set of different colours.{{info needed|What colour values are used?}} These planes slowly move over time.{{info needed|At what velocity or velocities?}}
The "End sky" texture, which is indeed the same texture used for the actual [[Minecraft:End sky]], is used as the "background" texture: it is sampled using screen-projected coordinates and multiplied by {{color|#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.


There are two distinct starfield effects: one associated with the End portal, and another associated with the End gateway. While similar, the End gateway renders additional planes of the subsequent "End portal" texture, which are noticeably bluer than the ones from the "normal" End portal version of the starfield.{{info needed|Again, what colour values are used here?}} The difference can be seen when these blocks are next to each other: most of the starfield matches up, but the bluer pixels will disappear once they cross into the End portal's domain from the End gateway.
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 {{color|#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.
 
{| class="wikitable" style="text-align:center;"
! rowspan="2" | Index
! rowspan="2" | Velocity
! rowspan="2" | {{abbr|Rotation|Shader rotation angle, reduced modulo 360; 0° corresponds to downward travel, and positive values are clockwise}}
! rowspan="2" | {{abbr|Scale|The scale factor applied to the sampled texture coordinates; higher values make the texture pattern appear smaller}}
! rowspan="2" | Color
! colspan="2" | Used by
|-
! {{code|portal}}
! {{code|gateway}}
|-
| 0
| {{frac|4|24000}}
| 20°
| 8.5
| {{abbr|{{color|#06191C}}|vec3(0.022087, 0.098399, 0.110818)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 1
| {{frac|5|24000}}
| 44°
| 8
| {{abbr|{{color|#031817}}|vec3(0.011892, 0.095924, 0.089485)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 2
| {{frac|6|24000}}
| 72°
| 7.5
| {{abbr|{{color|#071A1A}}|vec3(0.027636, 0.101689, 0.100326)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 3
| {{frac|7|24000}}
| 104°
| 7
| {{abbr|{{color|#0C1C1D}}|vec3(0.046564, 0.109883, 0.114838)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 4
| {{frac|8|24000}}
| 140°
| 6.5
| {{abbr|{{color|#111E19}}|vec3(0.064901, 0.117696, 0.097189)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 5
| {{frac|9|24000}}
| 180°
| 6
| {{abbr|{{color|#101620}}|vec3(0.063761, 0.086895, 0.123646)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 6
| {{frac|10|24000}}
| 224°
| 5.5
| {{abbr|{{color|#161D2A}}|vec3(0.084817, 0.111994, 0.166380)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 7
| {{frac|11|24000}}
| 272°
| 5
| {{abbr|{{color|#192717}}|vec3(0.097489, 0.154120, 0.091064)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 8
| {{frac|12|24000}}
| 324°
| 4.5
| {{abbr|{{color|#1B2132}}|vec3(0.106152, 0.131144, 0.195191)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 9
| {{frac|13|24000}}
| 20°
| 4
| {{abbr|{{color|#191C30}}|vec3(0.097721, 0.110188, 0.187229)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 10
| {{frac|14|24000}}
| 80°
| 3.5
| {{abbr|{{color|#222326}}|vec3(0.133516, 0.138278, 0.148582)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 11
| {{frac|15|24000}}
| 144°
| 3
| {{abbr|{{color|#123E3C}}|vec3(0.070006, 0.243332, 0.235792)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 12
| {{frac|16|24000}}
| 212°
| 2.5
| {{abbr|{{color|#322437}}|vec3(0.196766, 0.142899, 0.214696)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 13
| {{frac|17|24000}}
| 284°
| 2
| {{abbr|{{color|#0C5052}}|vec3(0.047281, 0.315338, 0.321970)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 14
| {{frac|18|24000}}
| 0°
| 1.5
| {{abbr|{{color|#34634D}}|vec3(0.204675, 0.390010, 0.302066)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 15
| {{frac|19|24000}}
| 80°
| 1
| {{abbr|{{color|#1550A9}}|vec3(0.080955, 0.314821, 0.661491)}}
| {{tc|No|×}}
| {{tc|Yes|✓}}
|}
For the ''n''th layer, where ''n'' starts at 1 and equals the table index plus 1, the horizontal offset is {{frac|17|''n''}}, the rotation angle is (''n''×''n''×4321+''n''×9)×2 degrees,{{info needed|What would the equation be for radians? I think both the JE and BE tables should list both degrees and radians}} and the scale is (4.5-{{frac|''n''|4}})×2. The vertical offset is (2+{{frac|''n''|1.5}})×(GameTime×1.5). Since GameTime increases by {{frac|1|24000}} per game tick, the Velocity value listed in the table is {{frac|(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.<ref>{{bug|MC-308516}}</ref>


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.<ref>{{bug|MC-265456}}</ref>
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.<ref>{{bug|MC-265456}}</ref>


=== ''Bedrock Edition'' ===
=== ''Bedrock Edition'' ===
{{section needed}}
{{Info needed section|Color reproduction may vary slightly between different devices (https://discord.com/channels/447104142729674753/449243256849563648/1512793138526294156)}}
The starfield effect in Bedrock Edition is rendered using a layered parallax system.
 
For [[Minecraft: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 [[Minecraft: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:
 
{| class="wikitable" style="text-align:center; margin: auto;"
| <small>{{code|textures/entity/end_portal.png}}</small>
| <small><small>{{code|textures/environment/end_portal_colors.png}}</small></small>
|-
| {{pximg|End Portal (texture) JE1.png|256px}}
| {{pximg|End Gateway (color texture) BE1.png|256px}}
|}
 
The {{code|end_portal.png}} texture supplies the starfield pattern, while the {{code|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 {{frac|239|255}}, {{frac|223|255}}, and {{frac|207|255}}, decreasing by {{frac|16|255}} for each subsequent layer until {{frac|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 {{frac|9|16}}, {{frac|11|16}}, {{frac|13|16}}, and {{frac|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,{{verify|not in my experience}} 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π:
 
{| class="wikitable" style="text-align:center;"
! Index
! Layer parameter
! {{abbr|Rotation|Rotation angle applied to the parallax texture coordinates, calculated as 32p×5π/7 and reduced to the range from 0 to 2π}}
! {{abbr|Virtual depth|Depth value used to calculate the parallax sampling position}}
! {{abbr|Layer brightness|Brightness factor applied before fog attenuation}}
! Color texture coordinates
! Color{{verify|maybe "intended colour", and go into detail on deviations on other devices? also, some are absent on end portals, but not end gateways, and this too is device dependent}}
|-
| 0
| {{frac|239|255}}
| {{frac|508|357}}π
| {{frac|7648|255}}
| {{frac|16|255}}
| ({{frac|9|16}},{{frac|9|16}})
| {{color|#698C84}}
|-
| 1
| {{frac|223|255}}
| {{frac|710|357}}π
| {{frac|7136|255}}
| {{frac|32|255}}
| ({{frac|11|16}},{{frac|9|16}})
| {{color|#698C84}}
|-
| 2
| {{frac|207|255}}
| {{frac|66|119}}π
| {{frac|2208|85}}
| {{frac|48|255}}
| ({{frac|13|16}},{{frac|9|16}})
| {{color|#2AB4B5}}
|-
| 3
| {{frac|191|255}}
| {{frac|400|357}}π
| {{frac|6112|255}}
| {{frac|64|255}}
| ({{frac|15|16}},{{frac|9|16}})
| {{color|#2AB4B5}}
|-
| 4
| {{frac|175|255}}
| {{frac|86|51}}π
| {{frac|1120|51}}
| {{frac|80|255}}
| ({{frac|9|16}},{{frac|11|16}})
| {{color|#698C84}}
|-
| 5
| {{frac|159|255}}
| {{frac|30|119}}π
| {{frac|1696|85}}
| {{frac|96|255}}
| ({{frac|11|16}},{{frac|11|16}})
| {{color|#698C84}}
|-
| 6
| {{frac|143|255}}
| {{frac|292|357}}π
| {{frac|4576|255}}
| {{frac|112|255}}
| ({{frac|13|16}},{{frac|11|16}})
| {{color|#2AB4B5}}
|-
| 7
| {{frac|127|255}}
| {{frac|494|357}}π
| {{frac|4064|255}}
| {{frac|128|255}}
| ({{frac|15|16}},{{frac|11|16}})
| {{color|#2AB4B5}}
|-
| 8
| {{frac|111|255}}
| {{frac|232|119}}π
| {{frac|1184|85}}
| {{frac|144|255}}
| ({{frac|9|16}},{{frac|13|16}})
| {{color|#53B884}}
|-
| 9
| {{frac|95|255}}
| {{frac|184|357}}π
| {{frac|608|51}}
| {{frac|160|255}}
| ({{frac|11|16}},{{frac|13|16}})
| {{color|#53B884}}
|-
| 10
| {{frac|79|255}}
| {{frac|386|357}}π
| {{frac|2528|255}}
| {{frac|176|255}}
| ({{frac|13|16}},{{frac|13|16}})
| {{color|#488D9D}}
|-
| 11
| {{frac|63|255}}
| {{frac|28|17}}π
| {{frac|672|85}}
| {{frac|192|255}}
| ({{frac|15|16}},{{frac|13|16}})
| {{color|#488D9D}}
|-
| 12
| {{frac|47|255}}
| {{frac|76|357}}π
| {{frac|1504|255}}
| {{frac|208|255}}
| ({{frac|9|16}},{{frac|15|16}})
| {{color|#53B884}}
|-
| 13
| {{frac|31|255}}
| {{frac|278|357}}π
| {{frac|992|255}}
| {{frac|224|255}}
| ({{frac|11|16}},{{frac|15|16}})
| {{color|#53B884}}
|-
| 14
| {{frac|15|255}}
| {{frac|160|119}}π
| {{frac|32|17}}
| {{frac|240|255}}
| ({{frac|13|16}},{{frac|15|16}})
| {{color|#488D9D}}
|-
| 15
| 0
| 0
| 0
| 1
| ({{frac|15|16}},{{frac|15|16}})
| {{color|#488D9D}}
|}
 
For a starfield layer with a layer parameter of ''p'', the virtual depth is 32''p'', the rotation angle of the texture coordinates is 32''p''×{{frac|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 {{frac|1|16}} of its original size. The coordinates are rotated by the rotation angle of the layer, then offset by 32''p'' 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 {{frac|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 ==
== History ==
=== ''Java Edition'' ===
=== ''Java Edition'' ===
{{info needed section|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}}
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java beta}}
|{{HistoryLine||1.8|dev=Pre-release|[[File:End Portal (texture) JE1.png|64px]] Added {{code|misc/particlefield.png}}, though without any apparent use at this point.}}
|{{HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 3|The starfield effect now exists.
|{{HistoryLine||1.0.0|dev=Beta 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,{{info needed|how exactly? I guess some sort of parallax effect?}} and the sky texture repeats instead of only being used once.{{info needed|how exactly does it repeat? how is it specified?}} Coloration also appears to be different at this point.{{info needed|can we get the color values used?}}
|This initial starfield effect differs considerably from the effect seen in current versions: it changes depending on camera position and movement,{{info needed|how exactly? I guess some sort of parallax effect?}} and the sky texture repeats instead of only being used once.{{info needed|how exactly does it repeat? how is it specified?}} Coloration also appears to be different at this point.{{info needed|can we get the color values used?}}
|It is used by the [[Minecraft:End Portal (block)|End portal block]], though only when viewed from above.
|It is used by the [[Minecraft:End Portal (block)|End portal block]], though only when viewed from above.
|[[File:End Sky (texture) JE1.png|64px]] This "sky" texture and [[File:End Portal (texture) JE1.png|64px]] this "portal" texture are used.}}
|[[File:End Sky (texture) JE1.png|64px]] Added {{code|misc/tunnel.png}}, which is used for the background of the starfield effect.
|{{HistoryLine||1.3.1|dev=12w25a|The End sky texture has changed from [[File:End Sky (texture) JE1.png|64px]] to [[File:End Sky (texture) JE2.png|64px]], thus modifying the appearence of the starfield.}}
|{{code|misc/particlefield.png}} is now used for the foreground planes of the starfield effect.}}
|{{HistoryLine||?|Starfields are no longer affected bizarrely by fog.}}
|{{HistoryLine||1.3.1|dev=12w23a|{{code|misc/tunnel.png}} has changed from [[File:End Sky (texture) JE1.png|64px]] to [[File:End Sky (texture) JE2.png|64px]], thus modifying the appearance of the starfield.}}
|{{HistoryLine||1.6.1|dev=13w24a|{{code|misc/particlefield.png}} has been renamed and moved to {{code|assets/minecraft/textures/entity/end_portal.png}}.
|{{code|misc/tunnel.png}} has been renamed and moved to {{code|assets/minecraft/textures/environment/end_sky.png}}.}}
|{{HistoryLine||1.9|dev=15w31a|[[Minecraft:End Gateway (block)|End gateway]]s, the second block to utilize a starfield effect, have been added. Much like End portals, this effect depends on the camera position.
|{{HistoryLine||1.9|dev=15w31a|[[Minecraft:End Gateway (block)|End gateway]]s, 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.{{info needed|Why does this happen? Is this intentional, or an unexpected quirk of not having the starfield rendered on the XZ plane?}}}}
|The top face resembles{{verify|is it identical, or just similar?}} that of the End portal, but the side faces are noticeably distorted.{{info needed|Why does this happen? Is this intentional, or an unexpected quirk of not having the starfield rendered on the XZ plane?}} How the bottom face looks is unknown.}}
|{{HistoryLine|||dev=15w33a|End gateways now use a different starfield effect from End portals: it is fixed with respect to the camera.
|{{HistoryLine|||dev=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.
|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.
|The animation now looks choppier, and indeed may not move at all on some operating systems.{{info needed|Why? Is this LWJGL's fault, or something else?}}
|This "fixed position" animation may sometimes appear jittery, and may not move at all on some operating systems.{{info needed|Why? Is this LWJGL's fault, or something else?}}
|The End sky texture used by the fixed starfield is rotated, squished, and repeated. It does not move with the camera or with time.{{info needed|By how much is it rotated, and to what extent is it distorted from being a square?}}}}
|The End sky texture used by the fixed starfield is rotated, squished, and repeated. It does not move with the camera or with time.{{info needed|By how much is it rotated, and to what extent is it distorted from being a square?}}
|{{HistoryLine||1.10|dev=16w20a|Something unspecified has changed with respect to the rendering of End portals; they now look noticeably darker than in 1.9.4.{{info needed|What changed in this version, exactly?}}}}
|End gateways are entirely unaffected by fog.}}
|{{HistoryLine||1.10|dev=16w20a|The end portal background color has been changed from {{color|#1A1A1A}} to {{color|#041113}}.
|The end gateway background color has been changed from {{color|#262626}} to {{color|#06191C}}.}}
|{{HistoryLine||?|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.}}
|{{HistoryLine||1.11|dev=16w40a|End portal blocks now use the same "fixed" starfield effect that End gateways use, though without the extra blue particles gateways have.
|{{HistoryLine||1.11|dev=16w40a|End 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.}}
|The non-fixed version of the starfield can therefore be considered effectively removed.}}
|{{HistoryLine||1.13|dev=17w43a|The starfield animation is now smooth, rather than choppy or frozen as it was before this version.{{info needed|What changed? Was this an old LWJGL issue?}}}}
|{{HistoryLine||1.11.1|dev=16w50a|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.}}
|{{HistoryLine||1.17|dev=21w10a|Only one instance of the "sky" texture is now rendered, and it is stretched across the entire background, unlike being repeated as it previously was.}}
|{{HistoryLine||1.13|dev=17w43a|The starfield animation now always appears smooth, rather than jittery or frozen as it sometimes was before this version.{{info needed|What changed? Was this an old LWJGL issue?}}}}
|{{HistoryLine||1.15|dev=19w39a|Starfields rendered by blocks are now rendered in the wrong position, or sometimes not at all.<ref>{{bug|MC-161852}}</ref>}}
|{{HistoryLine|||dev=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.}}
|{{HistoryLine|||dev=19w41a|End portal and end gateway blocks are no longer obscured by fog.}}
|{{HistoryLine||1.17|dev=21w10a|Only one instance of the "sky" texture is now rendered, and it is stretched across the entire background, unlike being repeated as it previously was.{{info needed|What code change happened to result in this modified outcome?}}
|The foreground particles appear larger in this version than previously.}}
|{{HistoryLine|||dev=21w11a|The foreground particles have seemingly been shrunk down to their pre-21w10a sizes.{{note|Specifically, a line in {{code|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 {{frac|1|2}}. See [[#21w11a value changes]] for a comparison.}}{{verify|was this indeed a revert, or are the sizes as of this version actually different from before?}} The background texture change persists.}}
|{{HistoryLine|||dev=21w13a|The starfield is now also rendered on the bottom of End portals, rather than only the top.}}
|{{HistoryLine|||dev=21w13a|The starfield is now also rendered on the bottom of End portals, rather than only the top.}}
|{{HistoryLine||1.20.5|dev=24w09a|The starfield is now used as the background of the [[Minecraft:End Poem]] and [[Minecraft:credit sequence]].}}
|{{HistoryLine||1.20.5|dev=24w09a|The starfield is now used as the background of the [[Minecraft:End Poem]] and [[Minecraft:credit sequence]].}}
|{{HistoryLine|||dev=Pre-Release 2|The starfield is now used as the background when entering or leaving the End.}}
|{{HistoryLine|||dev=Pre-Release 2|The starfield is now used as the background when entering or leaving the End.}}
|{{HistoryLine||1.21.5|dev=25w07a|Textures now move downward with respect to the camera, rather than in random directions.
|{{HistoryLine||1.21.5|dev=25w07a|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.<ref>{{bug|MC-308516}}</ref> 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.<ref>{{bug|MC-152382}}, {{bug|MC-230445}}, {{bug|MC-279572}}</ref>}}
|Starfield blocks are now affected by fog correctly.<ref>{{bug|MC-152382}}, {{bug|MC-230445}}, {{bug|MC-279572}}</ref>}}
|{{HistoryLine||26.1|dev=Pre-Release 1|Added the end_cube special model type, which can be used to create itels which render the starfield effect.
|{{HistoryLine||26.1|dev=snap2|{{code|assets/minecraft/textures/entity/end_portal.png}} has been renamed and moved to {{code|assets/minecraft/textures/entity/end_portal/end_portal.png}}.}}
|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.<ref>{{bug|MC-195237}}</ref>}}
|{{HistoryLine|||dev=Pre-Release 1|Added the {{code|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.<ref>{{bug|MC-195237}}</ref>
|[[File:End Portal (entity).gif|32px]][[File:End Portal (entity).png|32px]] 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.}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine||26.3|dev=snap1|Starfield objects now show the glowing outline as block displays,<ref>{{bug|MC-307625}}</ref> when held by an [[Minecraft:enderman]],<ref>{{bug|MC-308914}}</ref> when in a [[Minecraft:minecart]],<ref>{{bug|MC-308915}}</ref> when set as [[Minecraft:TNT]]'s displayed block ID,<ref>{{bug|MC-308916}}</ref> and as the item form of any {{code|end_cube}} item in the world.<ref>{{bug|MC-308917}}</ref>}}
}}
}}
==== Table of visual changes ====
===== Parallax =====
{| class="wikitable"
! Versions
! {{code|portal}}
! {{code|gateway}}
! Changes
|-
! [[Minecraft:Java Edition Beta 1.9 Prerelease 3|Beta 1.9 Prerelease 3]]<br>to<br>[[Minecraft:Java Edition 12w22a|12w22a]]
| [[File:Parallax Portal Starfield JE1.gif|300px]]
! class="tc-no" rowspan="2" | -
| Portal introduction
|-
! [[Minecraft:Java Edition 12w23a|12w23a]]<br>to<br>[[Minecraft:Java Edition 1.8.9|1.8.9]]
| rowspan="3" | [[File:Parallax Portal Starfield JE2.gif|300px]]
| End Sky texture change
|-
! [[Minecraft:Java Edition 15w31a|15w31a]]<br>to<br>[[Minecraft:Java Edition 15w32c|15w32c]]
| [[File:Parallax Gateway Starfield JE1.gif|300px]]
| Gateway introduction
|-
! [[Minecraft:Java Edition 15w33a|15w33a]]<br>to<br>[[Minecraft:Java Edition 1.9.4|1.9.4]]
! class="tc-no" rowspan="2" | -
| Gateway now camera-independent
|-
! [[Minecraft:Java Edition 16w20a|16w20a]]<br>to<br>[[Minecraft:Java Edition 16w39c|16w39c]]
| [[File:Parallax Portal Starfield JE3.gif|300px]]
| The starfield is darker and greener
|-
! colspan="4" | ''Parallax starfield no longer exists from 16w40a onward''
|}
===== Fixed =====
{| class="wikitable"
! Versions
! {{code|portal}}
! {{code|gateway}}
! Changes
|-
! [[Minecraft:Java Edition 15w33a|15w33a]]<br>to<br>[[Minecraft:Java Edition 1.9.4|1.9.4]]
! class="tc-no" rowspan="2" | -
| [[File:Fixed Gateway Starfield JE1.gif|300px]]
| Fixed starfield added, used by end gateway
|-
! [[Minecraft:Java Edition 16w20a|16w20a]]<br>to<br>[[Minecraft:Java Edition 16w39c|16w39c]]
| rowspan="2" | [[File:Fixed Gateway Starfield JE2.gif|300px]]
| The starfield is darker and greener
|-
! [[Minecraft:Java Edition 16w40a|16w40a]]<br>to<br>[[Minecraft:Java Edition 21w08b|21w08b]]
| [[File:Fixed Portal Starfield JE1.gif|300px]]
| Portal now camera-independent
|-
! [[Minecraft:Java Edition 21w10a|21w10a]]
| [[File:Fixed Portal Starfield JE2.gif|300px]]
| [[File:Fixed Gateway Starfield JE3.gif|300px]]
| Background now stretched instead of repeating, particle size increased
|-
! [[Minecraft:Java Edition 21w11a|21w11a]]<br>to<br>present
| [[File:Fixed Portal Starfield JE3.gif|300px]]
| [[File:Fixed Gateway Starfield JE4.gif|300px]]
| Particle size reverted
|}
===== Blocks =====
{| class="wikitable"
! Versions
! {{code|portal}}
! {{code|gateway}}
! Changes
|-
! [[Minecraft:Java Edition Beta 1.9 Prerelease 3|Beta 1.9 Prerelease 3]]<br>to<br>[[Minecraft:Java Edition 12w22a|12w22a]]
| [[File:End Portal JE2.gif|300px]]
! {{tc|No|-}}
| Portal introduction
|-
! [[Minecraft:Java Edition 12w23a|12w23a]]<br>to<br>[[Minecraft:Java Edition 1.8.9|1.8.9]]
| rowspan="3" | [[File:End Portal JE3.gif|300px]]
! {{tc|No|-}}
| End Sky texture change
|-
! [[Minecraft:Java Edition 15w31a|15w31a]]<br>to<br>[[Minecraft:Java Edition 15w32c|15w32c]]
| [[File:End Gateway JE1.gif|300px]]
| Gateway introduction
|-
! [[Minecraft:Java Edition 15w33a|15w33a]]<br>to<br>[[Minecraft:Java Edition 1.9.4|1.9.4]]
| [[File:End Gateway JE2.gif|300px]]
| Gateway now camera-independent
|-
! [[Minecraft:Java Edition 16w20a|16w20a]]<br>to<br>[[Minecraft:Java Edition 16w39c|16w39c]]
| [[File:End Portal JE4.gif|300px]]
| rowspan="2" | [[File:End Gateway JE3.gif|300px]]
| The starfield is darker and greener
|-
! [[Minecraft:Java Edition 16w40a|16w40a]]<br>to<br>[[Minecraft:Java Edition 21w08b|21w08b]]
| [[File:End Portal JE5.gif|300px]]
| Portal now camera-independent
|-
! [[Minecraft:Java Edition 21w10a|21w10a]]
| [[File:End Portal JE6.gif|300px]]
| [[File:End Gateway JE4.gif|300px]]
| Background now stretched instead of repeating, particle size increased
|-
! [[Minecraft:Java Edition 21w11a|21w11a]]<br>to<br>present
| [[File:End Portal JE7.gif|300px]]
| [[File:End Gateway JE5.gif|300px]]
| Particle size reverted
|}
==== Data changes ====
{{info needed section|there is still data to migrate from the userspace}}
===== 21w10a rendering changes =====
From 15w33a{{verify|we need to confirm that, besides the 16w20a color change, and whatever happened in 17w43a that stopped the animation from being jittery/frozen and the 1.15 changes that affected fog, that nothing changed about end gateway rendering from 15w33a to 21w08b}} to 21w08b, the starfield effect was defined in the game's code. 21w10a introduced resource-pack-configurable core shaders, with the shader file {{code|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 {{code|end_sky}} rather than {{code|end_portal}}, but otherwise behaved as the {{code|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).{{info needed|What algorithm was used to generate these colours?}} The same set of colors were generated on every session. End portals and end gateways used different color multipliers.{{info needed|Did this result in any visual differences from one block to the other besides the former not using the biggest, bluest layer?}}
{| class="wikitable" style="text-align:center"
! rowspan="2" | Index
! rowspan="2" | Texture
! rowspan="2" | Velocity
! rowspan="2" | {{abbr|Rotation|Shader rotation angle, reduced modulo 360; 0° corresponds to downward travel, and positive values are clockwise}}
! rowspan="2" | {{abbr|Scale|The scale factor applied to the sampled texture coordinates; higher values make the texture pattern appear smaller}}
! rowspan="2" | Color
! colspan="2" | Used by
|-
! {{code|portal}}
! {{code|gateway}}
|-
| 0
| {{code|end_sky}}
| {{frac|4|24000}}
| 20°
| 4.25
| {{abbr|{{color|#06191C}}|vec3(0.022087196, 0.09839935, 0.11081758)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 1
| {{code|end_portal}}
| {{frac|5|24000}}
| 44°
| 4
| {{abbr|{{color|#031817}}|vec3(0.011891537, 0.095924295, 0.089485295)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 2
| {{code|end_portal}}
| {{frac|6|24000}}
| 72°
| 3.75
| {{abbr|{{color|#071A1A}}|vec3(0.027636293, 0.10168868, 0.1003257)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 3
| {{code|end_portal}}
| {{frac|7|24000}}
| 104°
| 3.5
| {{abbr|{{color|#0C1C1D}}|vec3(0.046563886, 0.1098827, 0.11483763)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 4
| {{code|end_portal}}
| {{frac|8|24000}}
| 140°
| 3.25
| {{abbr|{{color|#111E19}}|vec3(0.06490122, 0.117695674, 0.09718905)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 5
| {{code|end_portal}}
| {{frac|9|24000}}
| 180°
| 3
| {{abbr|{{color|#101620}}|vec3(0.06376111, 0.086894855, 0.123646155)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 6
| {{code|end_portal}}
| {{frac|10|24000}}
| 224°
| 2.75
| {{abbr|{{color|#161D2A}}|vec3(0.0848175, 0.11199415, 0.16638009)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 7
| {{code|end_portal}}
| {{frac|11|24000}}
| 272°
| 2.5
| {{abbr|{{color|#192717}}|vec3(0.09748936, 0.15411969, 0.09106404)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 8
| {{code|end_portal}}
| {{frac|12|24000}}
| 324°
| 2.25
| {{abbr|{{color|#1B2132}}|vec3(0.10615218, 0.13114361, 0.19519068)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 9
| {{code|end_portal}}
| {{frac|13|24000}}
| 20°
| 2
| {{abbr|{{color|#191C30}}|vec3(0.09772128, 0.110187955, 0.18722874)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 10
| {{code|end_portal}}
| {{frac|14|24000}}
| 80°
| 1.75
| {{abbr|{{color|#222326}}|vec3(0.13351634, 0.13827819, 0.14858162)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 11
| {{code|end_portal}}
| {{frac|15|24000}}
| 144°
| 1.5
| {{abbr|{{color|#123E3C}}|vec3(0.0700057, 0.24333227, 0.23579197)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 12
| {{code|end_portal}}
| {{frac|16|24000}}
| 212°
| 1.25
| {{abbr|{{color|#322437}}|vec3(0.19676577, 0.14289941, 0.21469556)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 13
| {{code|end_portal}}
| {{frac|17|24000}}
| 284°
| 1
| {{abbr|{{color|#0C5052}}|vec3(0.047280982, 0.31533787, 0.32197028)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 14
| {{code|end_portal}}
| {{frac|18|24000}}
| 0°
| 0.75
| {{abbr|{{color|#34634D}}|vec3(0.20467454, 0.39001027, 0.3020664)}}
| {{tc|Yes|✓}}
| {{tc|Yes|✓}}
|-
| 15
| {{code|end_portal}}
| {{frac|19|24000}}
| 80°
| 0.5
| {{abbr|{{color|#1550A9}}|vec3(0.08095474, 0.31482065, 0.6614909)}}
| {{tc|No|×}}
| {{tc|Yes|✓}}
|}
; After
{{info needed|I assume that the first pass of the overlaid planes was previously the end_sky we were previously discussing, but was later converted to a separate end_portal plane?}}
; Comparison
For a 128&times;128 {{code|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&times;1024 window:
<gallery>
Starfield background tiling 21w08b.png|15w33a to 21w08b{{note|Not depicted: gradual movement}}
Starfield background tiling 21w10a.png|21w10a to present
</gallery>
===== 21w11a value changes =====
{| class="wikitable" style="text-align:center"
! rowspan="2" | Index
! colspan="2" | {{abbr|Scale|The scale factor applied to the sampled texture coordinates; higher values make the texture pattern appear smaller}}
|-
! 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
|-
| {{abbr|15|Only used by end gateways}}
| 0.5
| 1
|}


=== ''Bedrock Edition'' ===
=== ''Bedrock Edition'' ===
{{section needed}}
{{HistoryTable
|{{HistoryLine|pocket}}
|{{HistoryLine||1.0.0|dev=alpha 0.17.0.1|The starfield effect has been implemented.
|[[File:End Portal BE.gif|32px]][[File:End Gateway BE.gif|32px]] End portals and end gateways were implemented in this version.}}
}}
 
==== Table of visual differences ====
{| class="wikitable" style="text-align:center"
! Host
! {{code|portal}}
! {{code|gateway}}
! Notes
|-
! Windows 11<br>AMD Radeon RX 7800 XT
| colspan="2" | [[File:Starfield BE.gif|300px]]
| All 16 colors are used
|-
! Kubuntu 24.04<br>AMD Radeon RX 7800 XT
| [[File:Starfield (even colors only) BE.gif|300px]]
| [[File:Starfield BE.gif|300px]]
| End portals only use even colors
|}


=== Legacy Console Edition ===
=== Legacy Console Edition ===
{{section needed}}
{{info needed section|TU14 changed the end sky texture, but I don't know if the end portal block actually uses it in this edition}}
{{HistoryTable
|{{HistoryLine|console}}
|{{HistoryLine||xbox=TU7|xbone=CU1|ps3=1.00|psvita=1.00|ps4=1.00|switch=1.0.1|wiiu=Patch 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.}}
|{{HistoryLine||xbox=TU46|xbone=CU36|ps3=1.38|psvita=1.38|ps4=1.38|wiiu=Patch 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.}}
|{{HistoryLine||xbox=TU54|xbone=CU44|ps3=1.52|psvita=1.52|ps4=1.52|wiiu=Patch 24|switch=1.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'' ===
{{section needed}}
{{HistoryTable
|{{HistoryLine|new 3ds}}
|{{HistoryLine||1.7.10|[[File:End Portal N3DSE.png|32px]][[File:End Gateway N3DSE.png|32px]] 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 ==
{{notelist}}


== References ==
== References ==
{{reflist}}
{{reflist}}
== Navigation ==
{{Navbox visuals}}

Latest revision as of 11:20, 22 July 2026

Template:Conjecture Template:Rewrite Starfield is a unique graphical effect used for rendering certain features related to Minecraft:the End.

Use cases

Starfield effects are used for the following:

Minecraft:Falling block entities of the End portal and End gateway do not render the starfield effect, and it seems highly unlikely (although unproven) that Minecraft:moving piston blocks would either.<ref>Template:Bug</ref>

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 Template:Code special model type as Template:Code (used for end portal blocks, the dimension loading screens for entering and exiting the End, and the credits sequence and preceding poem) and Template:Code, 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:

Template:Code Template:Code
Template:Pximg Template:Pximg

The "End sky" texture, which is indeed the same texture used for the actual Minecraft:End sky, is used as the "background" texture: it is sampled using screen-projected coordinates and multiplied by Template:Color. 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 Template:Color.

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 Template:Abbr Template:Abbr Color Used by
Template:Code Template:Code
0 Template:Frac 20° 8.5 Template:Abbr Template:Tc Template:Tc
1 Template:Frac 44° 8 Template:Abbr Template:Tc Template:Tc
2 Template:Frac 72° 7.5 Template:Abbr Template:Tc Template:Tc
3 Template:Frac 104° 7 Template:Abbr Template:Tc Template:Tc
4 Template:Frac 140° 6.5 Template:Abbr Template:Tc Template:Tc
5 Template:Frac 180° 6 Template:Abbr Template:Tc Template:Tc
6 Template:Frac 224° 5.5 Template:Abbr Template:Tc Template:Tc
7 Template:Frac 272° 5 Template:Abbr Template:Tc Template:Tc
8 Template:Frac 324° 4.5 Template:Abbr Template:Tc Template:Tc
9 Template:Frac 20° 4 Template:Abbr Template:Tc Template:Tc
10 Template:Frac 80° 3.5 Template:Abbr Template:Tc Template:Tc
11 Template:Frac 144° 3 Template:Abbr Template:Tc Template:Tc
12 Template:Frac 212° 2.5 Template:Abbr Template:Tc Template:Tc
13 Template:Frac 284° 2 Template:Abbr Template:Tc Template:Tc
14 Template:Frac 1.5 Template:Abbr Template:Tc Template:Tc
15 Template:Frac 80° 1 Template:Abbr Template:Tc Template:Tc

For the nth layer, where n starts at 1 and equals the table index plus 1, the horizontal offset is Template:Frac, the rotation angle is (n×n×4321+n×9)×2 degrees,Template:Info needed and the scale is (4.5-Template:Frac)×2. The vertical offset is (2+Template:Frac)×(GameTime×1.5). Since GameTime increases by Template:Frac per game tick, the Velocity value listed in the table is Template:Frac. 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.<ref>Template:Bug</ref>

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.<ref>Template:Bug</ref>

Bedrock Edition

Template:Info needed section The starfield effect in Bedrock Edition is rendered using a layered parallax system.

For Minecraft: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 Minecraft: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:

Template:Code Template:Code
Template:Pximg Template:Pximg

The Template:Code texture supplies the starfield pattern, while the Template:Code 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 Template:Frac, Template:Frac, and Template:Frac, decreasing by Template:Frac for each subsequent layer until Template:Frac 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 Template:Frac, Template:Frac, Template:Frac, and Template:Frac. With nearest-neighbor filtering, these coordinates fall within the bottom-right 2×2-pixel region of the color texture, so four colors are used,Template: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 Template:Abbr Template:Abbr Template:Abbr Color texture coordinates ColorTemplate:Verify
0 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
1 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
2 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
3 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
4 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
5 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
6 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
7 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
8 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
9 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
10 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
11 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
12 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
13 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
14 Template:Frac Template:Fracπ Template:Frac Template:Frac (Template:Frac,Template:Frac) Template:Color
15 0 0 0 1 (Template:Frac,Template:Frac) Template:Color

For a starfield layer with a layer parameter of p, the virtual depth is 32p, the rotation angle of the texture coordinates is 32p×Template:Frac 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 Template:Frac 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 Template:Frac 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

Template:Info needed section Template:HistoryTable

Table of visual changes

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

Data changes

Template:Info needed section

21w10a rendering changes

From 15w33aTemplate:Verify to 21w08b, the starfield effect was defined in the game's code. 21w10a introduced resource-pack-configurable core shaders, with the shader file Template:Code 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 Template:Code rather than Template:Code, but otherwise behaved as the Template:Code 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).Template:Info needed The same set of colors were generated on every session. End portals and end gateways used different color multipliers.Template:Info needed

Index Texture Velocity Template:Abbr Template:Abbr Color Used by
Template:Code Template:Code
0 Template:Code Template:Frac 20° 4.25 Template:Abbr Template:Tc Template:Tc
1 Template:Code Template:Frac 44° 4 Template:Abbr Template:Tc Template:Tc
2 Template:Code Template:Frac 72° 3.75 Template:Abbr Template:Tc Template:Tc
3 Template:Code Template:Frac 104° 3.5 Template:Abbr Template:Tc Template:Tc
4 Template:Code Template:Frac 140° 3.25 Template:Abbr Template:Tc Template:Tc
5 Template:Code Template:Frac 180° 3 Template:Abbr Template:Tc Template:Tc
6 Template:Code Template:Frac 224° 2.75 Template:Abbr Template:Tc Template:Tc
7 Template:Code Template:Frac 272° 2.5 Template:Abbr Template:Tc Template:Tc
8 Template:Code Template:Frac 324° 2.25 Template:Abbr Template:Tc Template:Tc
9 Template:Code Template:Frac 20° 2 Template:Abbr Template:Tc Template:Tc
10 Template:Code Template:Frac 80° 1.75 Template:Abbr Template:Tc Template:Tc
11 Template:Code Template:Frac 144° 1.5 Template:Abbr Template:Tc Template:Tc
12 Template:Code Template:Frac 212° 1.25 Template:Abbr Template:Tc Template:Tc
13 Template:Code Template:Frac 284° 1 Template:Abbr Template:Tc Template:Tc
14 Template:Code Template:Frac 0.75 Template:Abbr Template:Tc Template:Tc
15 Template:Code Template:Frac 80° 0.5 Template:Abbr Template:Tc Template:Tc
After

Template:Info needed

Comparison

For a 128×128 Template:Code 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 Template:Abbr
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
Template:Abbr 0.5 1

Bedrock Edition

Template:HistoryTable

Table of visual differences

Host Template:Code Template:Code Notes
Windows 11
AMD Radeon RX 7800 XT
File:Starfield BE.gif All 16 colors are used
Kubuntu 24.04
AMD Radeon RX 7800 XT
File:Starfield (even colors only) BE.gif File:Starfield BE.gif End portals only use even colors

Legacy Console Edition

Template:Info needed section Template:HistoryTable

New Nintendo 3DS Edition

Template:HistoryTable

Notes

Template:Notelist

References

Template:Reflist

Navigation

Template:Navbox visuals