Replies: 2 comments 3 replies
-
Have you tried the overload that takes a palette index?
|
Beta Was this translation helpful? Give feedback.
3 replies
-
cool; thanks for the help. I guess I can get it done this way (: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using a SRGB back buffer (
BGFX_RESET_SRGB_BACKBUFFER
), that means the clear color is specified in linear light, and converted to sRGB when written into the back buffer.As a result, the precision available for representing dark clear colors is rather poor.
This is one of the reasons people use the sRGB encoding in the first place — better mapping to human perception, especially in near-black colors. When we specify linear light using a u8 (as bgfx forces us to, when using the above settings), we throw away useful precision.
In the underlying backends,
float
is used, as is proper. For instance, in GL it callsglClearColor(float, float, float, float)
.But there is no way to pass a
float
directly through bgfx, that I have found.I imagine this would simply be a new
setViewClear
override, and the internalbgfx::Clear
struct would need to store floats, as well.Beta Was this translation helpful? Give feedback.
All reactions