Distance Field Technique

  一种小纹理高清放大的技术。

  Signed Distance Field Technique

 

    A distance field is generated from a high resolution image, and then stored into a channel of a lower-resolution texture.  which has been previously used to develop games such as the Half-Life 2 series, Counter-Strike: Source and Day of Defeat: Source.

    In the simplest case, this texture can then be rendered simply by using the alpha-testing and alpha-thresholding feature of modern GPUs.

 

    The distance function stored in an 8-bit channel. By doing so, we are able to take advantage of the native bilinear texture interpolation.  

    Once this signed distance has been calculated, we map it into the range 0..1, with 0 representing the maximum possible negative distance and 1.0 representing the maximum possible positive distance. A texel value of 0.5 represents the exact position of the edge and, hence, 0.5 is generally used for the alpha threshold value.

    小图中存储的alpha是,在原大图中,该点到最近的边缘的距离。

    Signed Distance Field Technique

应用

1、SoftEdge。

  two values using the smoothstep() function.

    Signed Distance Field Technique

2、Outline。

   distance values.

    Signed Distance Field Technique

3、Glow

  the smoothstep function can be used.

    Signed Distance Field Technique

4、Drop Shadow

  texture coordinate offset to produce drop shadows

    Signed Distance Field Technique

5、

 

参考:

1、《Improved Alpha-Tested Magnification for Vector Textures and Special Effects》.pdf

2、http://www.360doc.com/content/17/0930/09/110467_691283041.shtml

相关文章:

  • 2021-08-27
  • 2021-06-20
  • 2021-11-27
  • 2021-06-22
  • 2021-10-31
  • 2021-06-02
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2021-12-16
  • 2022-03-06
  • 2022-02-27
  • 2022-03-05
  • 2021-06-21
  • 2021-05-03
相关资源
相似解决方案