FlexibleToonShaderGD icon indicating copy to clipboard operation
FlexibleToonShaderGD copied to clipboard

Godot 4

Open hidemat opened this issue 2 years ago • 5 comments
trafficstars

Any chance that you would be willing to port this to Godot 4?

hidemat avatar Feb 11 '23 23:02 hidemat

Hi, I've created a fork with port to Godot 4.0 https://github.com/atzuk4451/FlexibleToonShaderGD-4.0

atzuk4451 avatar May 18 '23 05:05 atzuk4451

Hi, I've created a fork with port to Godot 4.0 https://github.com/atzuk4451/FlexibleToonShaderGD-4.0

I just tried it out on Godot 4.1.1... It's like it outputs at a lower color depth (colors more saturated than they should, dark greys are almost black and dark whites are just white).

Unless I'm missing some extra steps since I'm new on using Godot 4.x...

SereneMango avatar Aug 11 '23 14:08 SereneMango

I looked up at the forked ver. of the flexible_toon.gdshader file, and it seems to be almost identical? Only change I could find was the removal of the PI constant (I assume it's built-in Godot 4).

If I'm not wrong, Godot 4 doesn't use OpenGL 3.0...

That's probably all I can contribute to the discussion, I'm a noob with shader files.

SereneMango avatar Aug 11 '23 14:08 SereneMango

@SereneMango Hi, there is some change in lighting from godot 3, to godot 4. If you will port any scene from 3 to 4 you can see how tint of light changes without changing any settings. I think you can still get the look you want with ported shader if you tweak it a little bit. I did not change any calculations in my port, I only swapped variables which were replaced in 4.x version. I think the biggest change is in environment, try tweaking with World Environment node Background, Ambient Light and Adjustments tab. And also color of albedo in shader to tint it a little to your liking

atzuk4451 avatar Aug 11 '23 14:08 atzuk4451

For some reason I never touched the Adjustments tab for the World Environment. Setting the Saturation down to 0.8 gets the colors really close to my model when shadeless, with a near white Ambient Light and 1 of Energy.

We'll see how this will go on the long run, but as for now, thanks for the advice!

SereneMango avatar Aug 11 '23 15:08 SereneMango