[Zz] HDR the Bungie way

Source: Internet
Author: User

Http://blog.csdn.net/toughbro/article/details/6755394

 

Bufferencoding game float Algorithm

Bungie 06, paper on gamefest.

The full text is more systematic. If you are free, you can better read the original text. Here, I will extract some of the Nice parts.

Micro cloud link: http://url.cn/I4SYbF

Why HDR?

Why HDR? In short, LDR is more authentic. In contrast, LDR is distorted, which affects the substitution of immersive games to players,

The actual benefits are listed as follows: mainly focus on the maintenance of scope and details.

  • Let us further feel the brightness of the game
  • Better Bloom, glare,
  • Automatically adjusts the exposure to maximize the display brightness.
  • Keep details During Blending
LinearpipelineLighting computing needs to be performed in linear space. The problem with gamma space is that texture can be read and output. In fact, if lighting is not performed, use sRGB to read texture, the result of writing the render target with sRGB is the same as that of sRGB sample texture and sRGB write buffer. The problem is that in shading, when we calculate lighting, if it is in Gamma space, it will be wrong in mathematics, and it will be imperfect. For example, linear Pipeline
  • The hardware gamma correct does not directly perform a POW calculation, but uses some approximate algorithms. Here there is a certain mismatch,
    • Bungie's artist is uncomfortable because it is inconsistent with the reality in Photoshop.
    • In this case, the corresponding gamma profile can be used in Photoshop to ensure consistency.
  • Alpha blending can also have hardware support for linear space.
    • But is it okay to stay in linear space all the time?
  • Render target
    • In theory, dynamic range (ratio of brightest to darkest) is used)
    • But it is not ideal in actual application, so it is better to focus on usable exposure range.
    • That is, the exposure range of the color level will not be generated.
    • Rgbe and rgbm encoding methods are not as good as fp16, but they are also good, but they do not have hardware Blending
      • Halo3 cubemap is the rgbm. Although it is not entirely correct in mathematics, it looks good.
  • Postfx
    • Both bloom and tone mapping have curve for correction.
      • Physically accuracy is missing.
        • However, you can't stick to it either. Movies and so on are all correct based on physical.
Here, I think Bloom's handling is more open-minded. When I met a little helpless (the color level problem at the time), Bungie will conduct in-depth analysis to find out the essence of the problem, then a clever trick will be done. This is like the small water drop in the three-body system. When you don't know about it, he is invincible and indestructible. After learning about it, it is so easy to destroy it. In the original Bloom, we can see that bloom is a little too good, and the dark is not very nice. We hope we can make bloom Fresh: We made the results of bloom curve: here, we corrected the bloom as follows: the dotted line is the original bloom distribution, which is then corrected to the yellow line. Note that curve is for brightness and cannot be used directly for color RGB, which will change the color: [CPP]View plaincopyprint?
  1. <Span style = "font-family: 'Microsoft yahei';"> intensity = dot (color, float3 (0.3f, 0.3f, 0.3f ));
  2. Bloom_intensity = bloom_curve (intensity );
  3. Bloom_color = color * bloom_intensity/intensity;
  4. </Span>
The process of bloom is to keep blur + downsample, and then go back to the up sample to obtain the available bloom buffer.

[Zz] HDR the Bungie way

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.