1、柔光shader//柔光
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_FragColor=2.0*blendColor*baseColor+baseCol..
分类:
其他好文 时间:
2017-06-01 00:26:33
阅读次数:
310
下图是使用高斯模糊和未使用高斯模糊的效果图对比正常图片高斯模糊后1、标准高斯模糊原理:每个像素周围对应的像素乘以对应的算子,然后除以算子的综合算子为121242121fragmentshadervaryingvec2M_coord;
varyingvec3M_normal;
varyingvec3M_WordPos;
uniformsampler2DU_MainT..
分类:
其他好文 时间:
2017-06-01 00:22:38
阅读次数:
288
1、平滑shader//平滑
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4color=vec4(0.0);
intcoreSize=3;
floattexelOffset=1/300.0;
floatkernel[9];
kernel[6]=1;kernel[7]=1;kernel[8]=1;
kernel[3]=1;kernel[4]=1;k..
分类:
其他好文 时间:
2017-06-01 00:21:52
阅读次数:
283
1、正片叠底shader//正片叠底
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_FragColor=blendColor*baseColor;
}..
分类:
其他好文 时间:
2017-06-01 00:21:38
阅读次数:
148
1、正片叠底shader//正片叠底
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_FragColor=blendColor*baseColor;
}..
分类:
其他好文 时间:
2017-06-01 00:19:50
阅读次数:
189
图片混合变亮与变暗的效果,如下图所示变暗效果变亮效果变亮shaderuniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_..
分类:
其他好文 时间:
2017-06-01 00:19:43
阅读次数:
181
1、颜色加深shader//颜色加深
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_FragColor=vec4(1.0)-(vec4(1.0)-bas..
分类:
其他好文 时间:
2017-06-01 00:18:50
阅读次数:
221
1、正片叠底shader//正片叠底
uniformsampler2DU_MainTexture;
uniformsampler2DU_SubTexture;
varyingvec2M_coord;
voidmain()
{
vec4blendColor=texture2D(U_SubTexture,M_coord);
vec4baseColor=texture2D(U_MainTexture,M_coord);
gl_FragColor=blendColor*baseColor;
}..
分类:
其他好文 时间:
2017-06-01 00:18:06
阅读次数:
164
膨胀:取一个像素周围的点,取最亮的点为当前的点颜色,为膨胀效果腐蚀:取一个像素周围的点,取最暗的点为当前的点颜色,为腐蚀效果膨胀FragmentShadervaryingvec2M_coord;
varyingvec3M_normal;
varyingvec3M_WordPos;
uniformsampler2DU_MainTexture;
uniformsampler2DU_Su..
分类:
其他好文 时间:
2017-06-01 00:17:04
阅读次数:
209
What:服务器向前端返回数据的原理 1.Buffer:缓存区,可以在TCP流和文件操作系统等场景中处理二进制数据流。//盒子的作用存储数据 2.Streams:数据流的形式传递到页面来,//相当于水流 3.Pipes:管道事件,可以操作数据流输出到哪里去 >浏览器页面 ...
分类:
其他好文 时间:
2017-05-31 18:55:20
阅读次数:
160