Stroke
// A simple blur shader, weighted on alpha
uniform sampler2D texture;
void main()
{
float radius = 0.01;
vec4 accum = vec4(0.0);
vec4 normal = vec4(0.0);
normal = texture2D(texture, vec2(gl_TexCoord[0].s, gl_TexCoord[0].t));
accum += texture2D(texture, vec2(gl_TexCoord[0].s-radius, gl_TexCoord[0].t-radius));
accum += texture2D(texture, vec2(gl_TexCoord[0].s+radius, gl_TexCoord[0].t-radius));
accum += texture2D(texture, vec2(gl_TexCoord[0].s+radius, gl_TexCoord[0].t+radius));
accum += texture2D(texture, vec2(gl_TexCoord[0].s-radius, gl_TexCoord[0].t+radius));
accum *= 0.25;
accum.r = 1.0;
accum.g = 0.0;
accum.b = 0.0;
normal = (accum * (1.0 - normal.a)) + (normal * normal.a);
gl_FragColor = normal;
}
http://www.cnblogs.com/cxiaojia/p/5203421.html 描边
Stroke的更多相关文章
- 背水一战 Windows 10 (13) - 绘图: Stroke, Brush
[源码下载] 背水一战 Windows 10 (13) - 绘图: Stroke, Brush 作者:webabcd 介绍背水一战 Windows 10 之 绘图 Stroke - 笔划 Brush ...
- iOS 2D绘图 (Quartz2D)之路径(stroke,fill,clip,subpath,blend)
像往常一样 这个系列的博客是跟着大神的脚步来的.按照往例 在此贴出原博客的出处: http://blog.csdn.net/hello_hwc?viewmode=list我对大神的崇拜之情 如滔滔江水 ...
- 学习SVG系列(3):SVG Stroke属性
SVG stroke 属性 1.stroke 2.stroke-width 3.stroke-linecap 4.stroke-dasharray 5.stroke-opacity 6.stroke- ...
- [javascript svg fill stroke stroke-width points polygon属性讲解] svg fill stroke stroke-width points polygon绘制多边形属性并且演示polyline和polygon区别讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- [javascript svg fill stroke stroke-width points polyline 属性讲解] svg fill stroke stroke-width points polyline 绘制折线属性讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- [javascript svg fill stroke stroke-width x1 y1 x2 y2 line stroke-opacity fill-opacity 属性讲解] svg fill stroke stroke-width stroke-opacity fill-opacity line绘制线条属性讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- [javascript svg fill stroke stroke-width x y rect rx ry 属性讲解] svg fill stroke stroke-width rect 绘制具有圆角矩形属性讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- [javascript svg fill stroke stroke-width rx ry ellipse 属性讲解] svg fill stroke stroke-width ellipse 绘制椭圆属性讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- [javascript svg fill stroke stroke-width circle 属性讲解] svg fill stroke stroke-width circle 属性 绘制圆形及引入方式讲解
<!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...
- 绘图: Stroke, Brush
Stroke - 笔划 Brush - 画笔 示例1.演示“Stroke”相关知识点Drawing/Stroke.xaml <Page x:Class="Windows10.Drawi ...
随机推荐
- JSP页面使用EL表达式不显示实际数据
今天在学习有关jsp的相关知识内容时,遇到了el表达式只是显示括号里面的内容 代码如下: <%@ page contentType="text/html;charset=UTF-8&q ...
- 返回值List是JsonArray
MyController中: index.jsp中
- 多线程-创建线程第二种方式-实现Runnable接口-细节和好处
1 package multithread2; 2 3 /* 4 * 创建线程的第一种方法:继承Thread类 5 * 6 * 创建线程的第二种方式:实现Runnable接口 7 * 8 * 1,定义 ...
- K8s PV and PVC and StorageClass
PVC和PV之间没有依靠ID.名称或者label匹配,而是靠容量和访问模式,PVC的容量和访问模式需要是某个PV的子集才能自动匹配上.注意:PVC和PV是一对一的,也即一个PV被一个PVC自动匹配后, ...
- Linux身份鉴别机制原理
传统的UNIX身份鉴别机制原理 传统的UNIX身份鉴别即口令认证方式,它主要通过识别用户的用户名或者UID号获取在/etc/shadow中存放的对应用户密码密文等信息,然后获取用户输入密码并采用cry ...
- 裸k8s搭建中遇到的两个坑
在装docker的时候报错了,需要先安装selinux版本.才能安装容器. 需要按照提示安装这个包. 采用强制安装.rpm -ivh 包名字 --force --nodeps 在k8s的master上 ...
- Windows mysql免安装版配置。(版本号-5.6.45);
Windows mysql免安装版配置.(版本号-5.6.45); 来自对 https://blog.csdn.net/weixin_42831477/article/details/81325691 ...
- Linux 配置mysql 免安装版。
二.Linux配置 mysql ? 1.linux配置mysql(要求全部使用免安装版) 5.1.从官网下载mysql5.tar.gz 5.2.使用xftp把mysql的压缩包上传到服务器上 5.3. ...
- bom案例4-模拟滚动条
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- Android状态栏微技巧,带你真正理解沉浸式模式【转】
感谢! 本文转自大佬郭霖:http://blog.csdn.net/guolin_blog/article/details/51763825 转载请注明出处:http://blog.csdn.net/ ...