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. mysql5.7-windows安装配置

    sonar要求mysql5.6版本以上,所以安装一下最新的mysql5.7 采用相对名路径和命令行启动,这样是为了方便迁移.也提供了加入服务的指令,但没有进行测试 解压mysql的zip压缩包 解压后 ...

  2. hive数据倾斜原因以及解决办法

    何谓数据倾斜?数据倾斜指的是,并行处理的数据集 中,某一部分(如Spark的一个Partition)的数据显著多于其它部分,从而使得该部分的处理速度成为整个数据集处理的瓶颈. 表现为整体任务基本完成, ...

  3. 怎样消除adobe flash player设置

    在有FLASH画面上,点右键选下面的设置,出现设置框去掉打上钩的即可. 如果flash player插件安装好后,视频仍无法播放,则进行以下操作:打开“我的电脑”——>“本地磁盘(C)” ——& ...

  4. 死无对证:tomcat7 + 中文cookie + goLang

    查了下资料,很多人遇到这个问题,但是goLang使用得相对少 java.lang.IllegalArgumentException: Control character in cookie value ...

  5. word中怎样设置页码包含总页数

    一个同事做毕业论文,论文是Word格式,1-2页是封面和目录,不需要页码,第3-10页是论文内容,需要从第1页开始显示,并显示论文内容的总页数8 页.具体为页脚处显示“第*页共*页”.他让我帮忙设置一 ...

  6. 源码编译php5.4 ./configure参数

    ./configure \--prefix=/usr/local/php/5.4 \--with-config-file-path=/usr/local/php/5.4/etc \--with-con ...

  7. 开源小程序CMS网站, JeeWx-App-CMS 1.0 首版本发布

    JeeWx-App-CMS 是jeewx开发的小程序网站开源项目,基于小程序wepy语言,具备cms网站的基本功能,能够打造简单易用的小程序公司官网.项目结构简单,逻辑清晰,代码规范,非常适合作为小程 ...

  8. 基于MFC的OpenGL程序<转>

    原贴地址:https://www.cnblogs.com/pinking/p/6180225.html 首先,使用的库是GLUT以及GLAUX,先下载两者,添加查找路径以及链接   一.单文本文件   ...

  9. python中pop()函数的用法

    pop() 函数用于移除列表中的一个元素(默认最后一个元素),并且返回该元素的值. 语法:list.pop(obj=list[-1]) //默认为 index=-1,删除最后一个列表值. obj -- ...

  10. 配置maven访问nexus,配置项目pom.xml以发布maven项目到nexus中

    maven访问nexus有三种配置方法,分别为: 项目pom.xml,优先级最高: user的settings.xml,优先级中,未在pom.xml中配置repository标签,则使用这个配置: m ...