←back to thread

Mini: Tonemaps (2023)

(mini.gmshaders.com)
42 points bpierre | 1 comments | | HN request time: 0.198s | source
Show context
kllrnohj ◴[] No.45308848[source]
This does seem to be very specific to Game Maker though. Like saying 0.0-1.0 is 8 bit unorm is incorrect. It's just a unorm, no bit depth is otherwise implied. Similarly HDR doesn't mean exceeding 1.0. It can mean that, but if you're going to a display directly you're going to want something more like 101010X2 unorm in PQ, which is still 0.0-1.0 in the fragment shader
replies(1): >>45310208 #
dahart ◴[] No.45310208[source]
> This does seem to be very specific to Game Maker though.

Good point. I was going to point out that in general comparing 6-bit color to float color should not result in a change in brightness, tonemapping, or anything other than maybe some visible quantizing in the 6-bit version. That first example makes sense to me if we’re talking about what Game Maker does with 6bpp vs float, and wasn’t meant to be a conceptual comparison of bit depths for shaders in any environment. So maybe GM doesn’t use the same color pipeline with LDR vs HDR colors, perhaps HDR is tonemapped and LDR isn’t? The first paragraph implies this, but doesn’t say it explicitly. Or is tonemapping in GM a user choice not determined by color format?

> Similarly HDR doesn’t mean exceeding 1.0

True, but it’s harder to see the point of HDR without having to deal with colors that are brighter than the display can handle.

There are lots of different ideas & suggested definitions around for what HDR means, but I like to think the important one is the idea of storing colors in absolute physical units, as opposed to relative units where 1.0 means one times the brightest color the display is capable of. Which, of course, you can do with any bit depth, but HDR tends to pair well with higher bit depths.

replies(1): >>45310978 #
1. kllrnohj ◴[] No.45310978[source]
> True, but it’s harder to see the point of HDR without having to deal with colors that are brighter than the display can handle.

1.0 is a completely arbitrary value that has no meaning. When used with sRGB 1.0 means "users brightness setting." When used with PQ, 1.0 means 10,000 nits. When used with HLG 1.0 means "idk maybe 1000 nits? nobody knows!"

You need the colorspace to be defined to know what 1.0 means and whether or not it represents an SDR or HDR value. Or if it's neither even and maps directly to the current display range.

Presumably game maker has fixed opinions here, but that gets back to "this is very game maker specific"

> but I like to think the important one is the idea of storing colors in absolute physical units,

That is not only the least important aspect of PQ HDR, it's downright wrong and the industry is fixing that bug :)