Trying to create a cube map from images:

@tool
extends Node
 
const NX = preload("res://prefabs/black_hole/preprocess/nx.png")
const NY = preload("res://prefabs/black_hole/preprocess/ny.png")
const NZ = preload("res://prefabs/black_hole/preprocess/nz.png")
const PX = preload("res://prefabs/black_hole/preprocess/px.png")
const PY = preload("res://prefabs/black_hole/preprocess/py.png")
const PZ = preload("res://prefabs/black_hole/preprocess/pz.png")
 
@export var preprocess: bool = false
@export var cubemap: Cubemap
 
func _process(_delta: float) -> void:
	if preprocess:
		preprocess = false
 
		cubemap = Cubemap.new()
		cubemap.create_from_images([
			PZ.get_image(),
			NZ.get_image(),
			NX.get_image(),
			PX.get_image(),
			PY.get_image(),
			NY.get_image()
		])

But the images are rotated a bit weird.

A chatter found the corresponding bug report in godot:

When I switched from Compatibility to Forward+, I noticed that cubemaps work differently and custom shaders produce different results.