Signed Distance Field Technique
【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
A 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的更多相关文章
- Signed Distance Field Shadow in Unity
0x00 前言 最近读到了一个今年GDC上很棒的分享,是Sebastian Aaltonen带来的利用Ray-tracing实现一些有趣的效果的分享. 其中有一段他介绍到了对Signed Distan ...
- signed distance field 算法
将二值图转化成signed distance field后,可以在双线性插值下实现平滑放大. 定义: 到前景的distance field:各点到最近前景点的距离. 到背景的distance fiel ...
- distance field(占坑
signed distance field https://kosmonautblog.wordpress.com/2017/05/09/signed-distance-field-rendering ...
- 运行带distance field的Hiero
从http://libgdx.badlogicgames.com/releases/下载zip包并解压,切换到解压后的目录,执行: java -cp gdx.jar;gdx-natives.jar;g ...
- Computer Graphics Research Software
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...
- 如何优雅的使用C语言绘制一只小猪佩奇
今天我们来用C语言画一只小猪佩奇---社会.社会....在画小猪佩奇之前,我们先使用带符号的距离长 (signed distance field,SDF) 来画一个圆形. 使用这个方法表示形状,但是这 ...
- VisualEffectGraph概述
Visual Effect Graph 由来: Visual Effect Graph 是2018.3 以后版本,出的新的粒子特效技术.它是用显卡渲染特效,区别于传统的Patical system 的 ...
- 在Unity中渲染一个黑洞
在Unity中渲染一个黑洞 前言 N年前观看<星际穿越>时,被其中的"卡冈图雅"黑洞所震撼.制作团队表示这是一个最贴近实际的黑洞效果,因为它是通过各种科学理论实现的.当 ...
- Brute-forced Euclid Distance Transform
Sepearable 2D EDT, going to extend to 3D in order to calculate the Signed Distance Function(Field) C ...
随机推荐
- ubantu 与Windows 资源共享
Linux与Windows共享文件夹之samba的安装与使用(Ubuntu为例) 作者:@gzdaijie本文为作者原创,转载请注明出处:http://www.cnblogs.com/gzdaij ...
- couchdb安装
fabric涉及到了couchdb做为数据库,所以单独安装一个进行测试,当然也可以使用docker来安装. 项目地址:http://couchdb.apache.org/ 这里采用windows来安装 ...
- sql server ldf 日志文件清理
- Yii实战中8个必备常用的扩展,模块和widget
Yii实战中8个必备常用的扩展,模块和widget 在经过畅K网 的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明. ...
- PHP微信公共号H5页面跳转小程序。
1.H5跳转小程序. function myfun(){ var openid = "<?=$_SESSION['openid']?>"; wx.miniProgram ...
- Android Netty Client
Android netty client Start a netty client on android Download netty Download url :https://netty.io/d ...
- koltin语言学习(一)——什么是koltin
转自:Koltin China (一) 介绍 #Kotlin-for-Android-Dev 1. 什么是Kotlin? Kotlin是JetBrains开发的基于JVM的语言.Kotlin是使用Ja ...
- PhotoShop阵列功能
阵列有两种,如下.但是PS没有阵列这一工具,一定要用ps的话,可以参照以下两条: 1:方形阵列 先按CTRL+ALT+T 会出现一个自由变换选取 但是这个是多重复制的选取只要一动就能复制了 确定 然后 ...
- spring boot 的常用注解
SpringBoot用于简化Spring应用的搭建,开发及部署:该框架采用注解的方式进行配置可以很方便的构建Spring应用. 1. @SpringBootApplication @SpringBoo ...
- 25_ajax请求_使用fetch
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...