Shader 学习笔记 ---Looking Through a Filter 过滤器
2009-01-15 16:37
453 查看
Expanding a dot product operation to its final equation
简单的点积计算颜色混合
Decomposition of a matrix multiplication into a set of dot product operations.
多个点积计算,矩阵计算
这部分感觉理解起来很简单,但是颜色混合那些数值的来历就要以后慢慢研究了。
Blurring Things Up
边缘化
An edge detection filter highlights the edges of an image. The edges are defined as sharp
color transitions between pixels. An edge detection filter serves little purpose in most
applications beyond teaching you about different filters but will come in handy later on
when you’re rendering silhouettes.
边缘化会探测出图像的边缘,并使它的像素有一个急剧的颜色突变。在绘制阴影时有很大作用。
动态模糊
A motion blur screen effect can serve one of two purposes. The first is the obvious: a simple emulation
of the real-life motion blur effect. The second is that when the effect is applied slightly to a
scene, it can cancel out aliasing effects that can occur in your rendering, effectively serving as an
inexpensive alternative when you do not have hardware antialiasing.
有两个作用,一个当然就是模拟现实中的动态模糊现象,第二个就是消除渲染中的锯齿现象, 当图形硬件不支持抗锯齿时,这是个廉价的选择
简单的PS代码
float4 blur_factor;
sampler Texture0;
sampler Texture1;
float4 ps_main(float2 texCoord: TEXCOORD0) : COLOR
{
float4 col1 = tex2D(Texture0, texCoord);
float4 col2 = tex2D(Texture1, texCoord);
// Interpolate in-between the two render targets
return lerp(col1,col2,blur_factor);
}
简单的点积计算颜色混合
Decomposition of a matrix multiplication into a set of dot product operations.
多个点积计算,矩阵计算
这部分感觉理解起来很简单,但是颜色混合那些数值的来历就要以后慢慢研究了。
Blurring Things Up
边缘化
An edge detection filter highlights the edges of an image. The edges are defined as sharp
color transitions between pixels. An edge detection filter serves little purpose in most
applications beyond teaching you about different filters but will come in handy later on
when you’re rendering silhouettes.
边缘化会探测出图像的边缘,并使它的像素有一个急剧的颜色突变。在绘制阴影时有很大作用。
动态模糊
A motion blur screen effect can serve one of two purposes. The first is the obvious: a simple emulation
of the real-life motion blur effect. The second is that when the effect is applied slightly to a
scene, it can cancel out aliasing effects that can occur in your rendering, effectively serving as an
inexpensive alternative when you do not have hardware antialiasing.
有两个作用,一个当然就是模拟现实中的动态模糊现象,第二个就是消除渲染中的锯齿现象, 当图形硬件不支持抗锯齿时,这是个廉价的选择
简单的PS代码
float4 blur_factor;
sampler Texture0;
sampler Texture1;
float4 ps_main(float2 texCoord: TEXCOORD0) : COLOR
{
float4 col1 = tex2D(Texture0, texCoord);
float4 col2 = tex2D(Texture1, texCoord);
// Interpolate in-between the two render targets
return lerp(col1,col2,blur_factor);
}
相关文章推荐
- Filter--过滤器学习笔记
- angularjs学习笔记之三(变量及过滤器Filter的使用)
- [原创]java WEB学习笔记44:Filter 简介,模型,创建,工作原理,相关API,过滤器的部署及映射的方式,Demo
- 学习笔记_Filter小结(过滤器JavaWeb三大组件之一)
- Servlet学习笔记(八):过滤器Filter详解
- Angular JS 学习笔记(自定义服务:factory,Promise 模式异步请求查询:$http,过滤器用法filter,指令:directive)
- java 过滤器(Filter)学习笔记
- Shader之学习笔记一
- Shader之学习笔记二
- Shader 学习笔记 ---Depth of Field 介绍
- Shader之学习笔记七
- Shader 学习笔记 20151112
- 学习UnityShader入门精要笔记3——更复杂的光照
- directshow学习笔记一-----DirectShow过滤器分类
- angularjs学习第三天笔记(过滤器第二篇---filter过滤器及其自定义过滤器)
- Java File类学习笔记1:运用FileNameFilter类,获得某一目录下所有指定扩展名的文件
- UrlRewriteFilter 学习笔记
- JavaWeb-过滤器Filter学习(四)敏感词过滤实例
- Unity Shader 学习笔记(十四)使用屏幕特效实现亮度饱和度和对比度
- servlet过滤器学习笔记