Skip to content

Weird color behavior on 2D GPU particles on opengl #71731

@Gnumaru

Description

@Gnumaru

Godot version

4.0.beta16

System information

windows 10, gles 3, nvidia graphics

Issue description

When using colors in the particle material of a particle either through the color, color_ramp or color_initial_ramp properties, if the color saturation (in hsv) is exactly 100, the color "corrupts" and turns into other. If the saturation is lowered to 99 the color does not corrupt anymore. This only happens with gpu particles, when you convert them to cpu particles the colors work fine.

Steps to reproduce

Create a gpu particle with a color ramp, set the fist color to pure red (FF0000) and the last color to pure orange (FF8000)

Or just watch the attached video:

weirdcolorrampbehavior.mp4

Minimal reproduction project

WeirdColorRampBehaviorOnGles3GpuParticles.zip

WorkAround

When using colors with 100 saturation, use 99 instead. The difference is probably not humanly perceptible anyway.

Notes

I noticed this color corruption occurs whenever the HSV saturation is set to 100. if the saturation is lowered to 99 the bug doesn't occur.

A first I thought it was a color ramp problem, but it turns out that just plain colors, without variation, also present this problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions