.GGR or .GRD support?

Godot Version

godot 4

Question

I’m working on a game using a gradient map shader and I’m wondering if there’s a gradient file type that godot accepts? I just imported a ggr into my project so I assume it doesn’t work, but what about grd? something bespoke? if anyone has any information that would be greatly appreciated.

1 Like

UPDATE:

I still don’t know about gradient-specific file formats, but if you drop a png of a pallette where a gradient texture should go, it can work

1 Like

Gradient textures are, textures. If they’re sampled the correct way in the shader they can be simply used as PNG. You just need to make sure that your texture has the data at the right place, for example if your shader reads a gradient like this color = texture(gradient, vec2(coord, 0)) where coord is the grayscale/remap value, this will expect a horizontal gradient and not a vertical one, so your texture should be constructed accordingly.

1 Like

thanks

1 Like