godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91k stars 21.17k forks source link

Cubemaps can't be created in the editor in 4.0 (works in 3.x) #65665

Open IuryBorges1993 opened 2 years ago

IuryBorges1993 commented 2 years ago

Godot version

4.0

System information

Linu,window

Issue description

Cubemap no longer works in godot 4.0, when trying to create a var cubMap=Cubemap.new();

does not allow changing the indexes to place the images.

when creating a 2D shader, I put: uniform samplerCube cube; , then I go to the shaders param part, and I try to create a cubemap, it no longer displays the sides of the 6 images.

in godot 3.0 it worked correctly godot3 5 godot4 0

Steps to reproduce

no godot 4.0 var cubMap=Cubemap.new(), não mostra como opções de lado para que eu possa colocar como imagens

Já no Godot 3.x em diante var cubMap=CubeMap.new(); mostrar as opções de lado para eu poder referenciar as minhas imagens nele

gostaria que arrumassem isso, eu uso muito godot para criar shader de fragment

Minimal reproduction project

godot3.5.zip godot4.0.zip

robbertzzz commented 1 year ago

This title is wrong. Cubemaps work fine, you just can't create them from the inspector anymore (which is still an issue). Creating them in code using create_from_images() works as intended.

Steinbeuge commented 6 months ago

When adding a Cubemap node to the shader, a shader parameter appears that will accept imported cube maps. However you may not put an imported texture in to the field of a Cubemap node. Using the shader param for the input seems to override the node. image

None of this seems to be documented in help files. EyeDir node is only available in Sky shader. I couldn't seem to get global view direction in spatial shader to work with normal/reflect etc to properly apply a custom cube map (tried many many combos that should work, noticed that when plugging view direction in to albedo the color never changes when rotating camera)