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
Description One of Timofey's birthday presents is a colourbook in a shape of an infinite plane. On the plane n rectangles with sides parallel to coord ...
分类:
其他好文 时间:
2017-03-22 22:59:50
阅读次数:
180
#include #include #include #include #include using namespace std; /*=============== all the structures ===============*/ typedef struct Frame { COORD ... ...
分类:
编程语言 时间:
2017-03-20 22:20:08
阅读次数:
215
1.理解painter是个过程接受frame参数,即在frame中画painter 2.frame-coord-map 中将一个单位正方形中的点映射到一个新框架中 3.transform-painter 则是将painter映射到一个新框架中返回的也是一个过程,也可以理解为返回一个painter ...
分类:
其他好文 时间:
2017-02-22 22:34:52
阅读次数:
281
1:使用inline函数的时候,必须使函数体和inline说明结合一起,否则编译器将视他为普通函数处理: false: inline void Coord::setcoord(int a,int b); true: inline void Coord::setcoord(int a ,int b) ...
分类:
其他好文 时间:
2017-01-08 14:05:16
阅读次数:
168
http://api.openweathermap.org/data/2.5/weather?q={Beijing},{CN}&units=metric&appid=2233c2ce7363b83f8bc8c182f74316bcunits:单位metric:公制单位,即温度为摄氏度{ "coord ...
分类:
其他好文 时间:
2016-10-21 20:16:54
阅读次数:
332