Vertex colors are a lot brighter when using the compatibility renderer
Asked Answered
F

4

0


I have a 3d scene which uses vertex colors and on the compatibility renderer the colors are way brighter. I could create a shader to use for the compatibility renderer to change the colors so they are the same as on the mobile renderer, but I don't know the formula that I have to apply to the colors to make them normal. I am using Godot 4.2 by the way.

Fanechka answered 8/12, 2023 at 20:30 Comment(0)
F
0

also I forgot to mention that I do have fog enabled, but I doubt that's the problem since the colors are messed up in the editor too when I'm using compatibility and since there is no fog in the editor I think that means the fog isn't the problem

Fanechka answered 8/12, 2023 at 21:4 Comment(0)
P
0

There are a number of things different between compatibility and forward+/mobile that could be causing the difference. Are you sure that it's the vertex colors?

  1. Fog absolutely does show in the editor.
  2. Is there lighting in the scene? That gets handled differently.
  3. Compatibility doesn't support HDR, so now glow etc.

If you really wanna test, you can make a shader with just vertex colors and no lighting or fog.

Peafowl answered 9/12, 2023 at 0:51 Comment(0)
F
0

well at least in my editor there is no fog because the environment is set at runtime. The issue does in fact appear to be with the lighting, since when I hide the light in the editor, the scene looks identical on both compatibility and mobile. I am using a directional light 3d. In what way exactly does the lighting get handled differently and how could I account for that to make it look the same?

Fanechka answered 9/12, 2023 at 6:51 Comment(0)
F
0

I was able to make the colors look pretty much the same as with the mobile renderer by using this: "DIFFUSE_LIGHT += clamp(dot(NORMAL, LIGHT), 0.0, 1.0) * ATTENUATION * LIGHT_COLOR * 0.1f;" (basically dividing the light by 10 to make it less bright). No idea why this works though

Fanechka answered 9/12, 2023 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.