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.

    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是,在原大图中,该点到最近的边缘的距离。

    

应用

1、SoftEdge。

  Two distance thresholds, Distmin and Distmax, are defined and the shader maps the distance field value between these two values using the smoothstep() function.

    

2、Outline。

   By changing the color of all texels which are between two userspecified distance values.

    

3、Glow

  When the alpha value is between the threshold value of 0.5 and 0, the smoothstep function can be used.

    

4、Drop Shadow

  texture coordinate offset to produce drop shadows

    

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

Signed Distance Field Technique的更多相关文章

  1. Signed Distance Field Shadow in Unity

    0x00 前言 最近读到了一个今年GDC上很棒的分享,是Sebastian Aaltonen带来的利用Ray-tracing实现一些有趣的效果的分享. 其中有一段他介绍到了对Signed Distan ...

  2. signed distance field 算法

    将二值图转化成signed distance field后,可以在双线性插值下实现平滑放大. 定义: 到前景的distance field:各点到最近前景点的距离. 到背景的distance fiel ...

  3. distance field(占坑

    signed distance field https://kosmonautblog.wordpress.com/2017/05/09/signed-distance-field-rendering ...

  4. 运行带distance field的Hiero

    从http://libgdx.badlogicgames.com/releases/下载zip包并解压,切换到解压后的目录,执行: java -cp gdx.jar;gdx-natives.jar;g ...

  5. Computer Graphics Research Software

    Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...

  6. 如何优雅的使用C语言绘制一只小猪佩奇

    今天我们来用C语言画一只小猪佩奇---社会.社会....在画小猪佩奇之前,我们先使用带符号的距离长 (signed distance field,SDF) 来画一个圆形. 使用这个方法表示形状,但是这 ...

  7. VisualEffectGraph概述

    Visual Effect Graph 由来: Visual Effect Graph 是2018.3 以后版本,出的新的粒子特效技术.它是用显卡渲染特效,区别于传统的Patical system 的 ...

  8. 在Unity中渲染一个黑洞

    在Unity中渲染一个黑洞 前言 N年前观看<星际穿越>时,被其中的"卡冈图雅"黑洞所震撼.制作团队表示这是一个最贴近实际的黑洞效果,因为它是通过各种科学理论实现的.当 ...

  9. Brute-forced Euclid Distance Transform

    Sepearable 2D EDT, going to extend to 3D in order to calculate the Signed Distance Function(Field) C ...

随机推荐

  1. tomcat和eclipse-wtp的一些配置

    TOMCAT配置UTF-8 server.xml配置文件: <Connector port="8080" protocol="HTTP/1.1" conn ...

  2. 理解 with递归调用 Sqlserver 树查询

    --with用法 --可以这么理解 with SQL语句变量或者叫临时表名 as( SQL语句 ) select * from SQL语句变量或者叫临时表名 --递归调用 with CTE as( s ...

  3. win7 安装英文语言包

    因为某些英文程序字符显示不全,所以考虑把 win7 改为英文语言.直接下载英文语言包安装不成功,经过多次尝试和百度终于找到合适的办法. 下载 Vistalizator.exe, windows6.1- ...

  4. [Android]Animation 动画介绍和实现

    Animation动画效果来实现菜单的显示和隐藏,本文就来介绍下吧. 1.Animation 动画类型 Android的animation由四种类型组成: XML中 alph 渐变透明度动画效果 sc ...

  5. 57.纯 CSS 创作一双黑暗中的眼睛

    原文地址:https://segmentfault.com/a/1190000015327725 感想:原来边框还能这样玩-->做会眨眼的眼睛 HTML code: <div class= ...

  6. laravel 的 intervention-image 图像处理笔记

    安装: https://blog.csdn.net/beyond__devil/article/details/62230610 需求: PHP >= 5.4 Fileinfo 扩展 GD库 & ...

  7. Apache 服务器 基础知识小结

    Apache HTTP Server(简称Apache)是Apache软件基金会的一个开放源码的网页服务器,可以在大多数计算机操作系统中运行,由于其多平台和安全性被广泛使用,是最流行的Web服务器端软 ...

  8. hadoop hdfs 元数据 journalnode editslog fsimage

    先上图,文章以后再上 截图有先后 所以有些延迟,但是不耽误总体的理解(active-nn=a-nn=active-namenode; s-nn=standby-nn=standby-namenode; ...

  9. StorageLevel

    val NONE = new StorageLevel(false, false, false, false)  val DISK_ONLY = new StorageLevel(true, fals ...

  10. taotao商城

    (1)写Dao层(大概是sqlMapConfig.xml,application-dao.xml,mapper), 配置顺序和内容,看下图: