godotengine / godot

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

Generate procedural-sky texture with gpu(based on shader) #11433

Closed MadIcecream closed 6 years ago

MadIcecream commented 7 years ago

Currently godot generates skybox texture with cpu. How about make it based on shader? I think it would be faster and be possible to make a realtime dynamic sky.

Here is unity's procedural-sky shader, hope it would be helpful: https://gist.github.com/cutepig49/450897569df1df5d1c996ae653610a3b

Zylann commented 7 years ago

Last time I talked to @reduz about dynamic skyboxes in general the problem is that Godot not only needs the "visible" sky texture, but also other various textures used for PBR. You would need to also generate them on GPU. A tradeof would be to be able to update the visible texture in realtime, while updating the others at lower pace / with different technique

bojidar-bg commented 6 years ago

Isn't this obsoleted by #17510?

Zylann commented 6 years ago

@bojidar-bg does it also address the fact PBR textures related to the sky need to be realtime as well?

bojidar-bg commented 6 years ago

I'm not completely sure, but I think so, yea.

BastiaanOlij commented 6 years ago

Duplicate of #8668 ?

Read my full comments there on the good/bad/ugly. And see working solution: https://github.com/BastiaanOlij/godot-sky-asset/tree/use_proxy_fix and video of said asset: https://youtu.be/-2YWV1NWwGY

bojidar-bg commented 6 years ago

Ok, closing as obsolete/duplicate of the above-mentioned issues.