Can I transfer this shader to Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By greenleafone7

I’ve done some works on building all sorts of shaders in Godot the past weeks (I’m new in shaders and Godot). I’ve had a few problems so far and I felt that even though the Godot shader language makes creating shaders very easy and organized, there are still things missing and you are a bit constrained. For example arrays, make it hard to create a shader like this one in Godot.

So for my ultimate achievement I am reading a paper on realistic atmospheres that is accompanied by the relevant code found here.

It will be a lot of work I am sure, but I would appreciate if someone that is fairly advanced on shaders in Godot could have a quick glance at that code and let me know if he can identify something that would stop me later on from being able to port this whole project in Godot. In essence a feature of hlsl that this project relies uppon that Godot couldn’t handle.


It is sort of moving along, but I am far from faithful to the original code posted and as a result not as good. Godot does not have structures and does not deal with loops very well. Moreover I am not sure how to have a buffer that will help me apply multiple passes of the fragment shader.

For someone wanting to get their feet wet you’ve taken a dive from a yacht while in the middle of the ocean. From my glance nothing will hinder you more than the amount of translation you have to do

Wakatta | 2021-04-03 06:36

Technically you are not wrong. But I am not just copying the shaders, I’m looking at them trying to understand the author’s logic. So even if I fail, there usually will be something I’ve learned. I have currently started with Bruneton’s original code, that alone seems very hard for me right now. But who knows, maybe I get something half decent by the end of it.

greenleafone7 | 2021-04-03 19:41