Could not apparently fit HDR portion into my original MadVR beginner guide ... so created separate one here
I am long overdue with this HDR stuff. I will try to explain this in simple terms ... skipping most technical details which I myself dont fully understand. Basics are looong ... so bear with me
First, color space. It basically defines what and how colors/brightness are encoded into video. Basically setting limits on how bright and saturated image can be.
DVD use rec601 ... BluRay rec709 ... and digital cinema DCI-P3. Each of these expanded saturation compared to previous one ... while leaving brightness limits virtually untouched (~100nits). So grass can be specified greener in rec709 compared to rec601.
It is important to note that for cinema, videos are mastered for expected cinema brightness ... which is about 50nits. While for DVD and Bluray same films are mastered for commercial TV which is about 100nits at the time.
With UHD ... bt2020 was introduced ... aka HDR ... that vastly expanded not only saturation limits but brightness too. Specifically for brightness ... the limit now is 10,000nits.
It is important to note that allowed values for brightness and saturation in bt2020 is not even. Significantly more values are allocated in 0-300nits range with only small portion allocated to higher nits range (higher nits you go - less values you can specify). That's because all important stuff happens in 0-300nits range. So having more values here allows pictures to have more details in this range (hence UHD can have significantly more details in dark scenes than HD ... but it does not make black blacker as some claim).
Above 300 nits is for highlights. Usually only small potion of picture goes to very high brightness. This allows for details in bright areas like sky, sun, explosion that previously was not possible with other colorspaces.
All sounds good ... except ... no commercial display can fully cover bt2020. Not just brightness but saturation too (so your TV might not be able to render grass as green as UHD disc wants it too ... even if that grass is not very bright).
Thats where tone mapping comes. Its basically a logic that maps bt2020 to what dispay can actually display. In nutshell - it compresses (your TV can display 0-600nits ... so it compresses 0-10000 range to 0-600). This type of compression obviously degrade quality.
To reduce amount of compression ... HDR have metadata that among other things specify peak brightness of whole video. So if peak brightness of movie is 2000nits ... that hypothetical TV i mention above will only need to compress 0-2000 to 0-600 ... less compression - better quality. Thats HDR10 fo you.
Dolby Vision and HDR10+ go further and specify peak brightness for each scene ... so you have less compression on darker scenes.
Now to the biggest problem. With exception of Dolby Vision - there is no strict standard on how tone mapping should be done. Each manufacturer do their own thing based on their skills and processing power available in TV (so yes ... TV with better processor can potentially have better tone mapping algorithm)
You are not, however, limited to tone mapping on TV/projector. You can do tone mapping in dedicated processors (like Lumagen and MadVR Envy) or on PC.
When TV/projector is doing tone mapping, it will often pops up HDR logo to indicate it is doing so (it does so when it receive HDR metadata in video stream). In most cases, TV will boost its brightness while doing so too. That HDR logo does not mean that TV enters into some sort of magical HDR state that make image magically better (though most people will assume that ... and hence perceive that ... aka placebo effect). All it means is TV is doing tone mapping (that actually degrade original quality video into something that TV can actually display).
When you use dedicated processors or PC to do tone mapping ... TV will not pop up HDR logo as it is not doing tone mapping ... most ppl automatically assume and perceive it as bad.
Now that we cover basics ... lets get back to PC. Some media players on PC have tone mapping (MC RO Standard, VLC, Kodi, Plex). As they usually have no setting to change for HDR ... I suspect they assume that your display has no HDR and hence tone map to standard 100nits of SD (this is understandable as it makes using this much easier for average Joe).
MadVR allows you to specify your target nits ... while this requires some knowledge ... it reduces compression and hence improve quality.
Furthermore ... MadVD strives to preserve hue/color while compressing (so your red explosion does not turn into orange one durung tone mapping). In harry potter deatly hallow 2 ... train station scene ... my LG E6 tone mapping adds slight greenish hue to red lamps ... no such thing in MadVR.
Now to MadVR settings. HDR options are located in [devices]->["name of your device"]->[hdr]
1) let MadVR decide - no explanation is needed for this one lol
2) passthrough HDR to display - madVR does not do any tone mapping and just sends video to TV. If this choice is chosen, check box will be available [send HDR metadata to the diplay] ... ticking it will make TV/projector do tone mapping (HDR logo will pop up when movie start playing ... unticking it - TV/projector will do nothing and video will appear washed out
if you tick [send HDR metadata to the display] and let your TV/projector do tone mapping - be aware that using mouse to bring MC play controls will bring your TV/projector out of HDR mode and the video will be washed out ... TV/projector will enter HDR mode as soon as MC play controls disappear ... if that annoys you, use keyboard to control playback
3) tone map HDR using external 3DLUT - if you know what that means, you are likely expert and will not be reading this guide lol ... if you don't know what that means - just skip this option
4) tone map HDR using pixel shaders - this is where the magic is and tells MadVR to do tone mapping. Selecting this brings more options:
[target nits] - from what I understand this is not absolute value of your display peak brightness. Though you should start with that value. Lowering this will make picture brighter. Increasing this will increase "HDR effect". Read somewhere (but cannot recall where) that if this value is above 480, then madVR will not compress 0-300 range of video essentially preserving most important part of the video intact. Setting this below 480 will start affect 0-300 range but might be necessary if you have projector
[tone mapping curve] - just leave it at BT.2390
[color tweak for fire & explosions] - essentially when tone mapping very bright fire (or other very bright stuff), MadVR will try to achieve highest brightness without sacrificing color/hue. In most cases, brightness of specific color is very limited compared to TV spec brightness. So madVR will add other colors to boost the brightness of required color in proportion that does not change hue/color but will desaturate it (so very bright red will still be red but whitish red ... most TV tone mapping will sacrifice hue for this turning your red to orange). This option tells MadVR if it should instead focus on saturation instead of brightness (thus making you red redder but at expense of brightness ... aka clipping). You have to try each option here to see what you like (remember there is no standard for HDR tone mapping - so pick what you like ... and not what other ppl tell you to pick)
[highlight recovery strength] - essentially when tone mapping you compress ... resulting in loss of highlights ... this option tries to recover some of what is loss ... again - try each option here to see what you like (this one adds quite a bit to rendering time ... so if your GPU struggles ... might need to turn this off)
[measure each frame peak luminance] - this is for information only when you press CTRL+J
[output video in HDR format] - this one is interesting. If you enable it, it will send HDR metadata to display, causing it to tone map received video which is already tone mapped by MadVR (so TV will further compress your video). This one will cause HDR logo to pop up indicating that display is doing tone mapping.
Theoretically, if video levels tone mapped by MadVR are already within range of what TV can display - TV tone mapping algorithm should do nothing ... in practice its often not the case and TV will still try to "improve" picture
The only use scenario I can think for this option is ... you watch non-HDR stuff not at maximum TV brightness ... but want TV to:
a. not tone map by setting MadVR target peak nits within range of what TV can display (you assume here that TV will not touch video that it can display ... which is big assumption)
b. enter HDR mode anyway so it automatically set your TV brightness to max