赞
踩
效果图
正片叠底shader
- varying vec2 V_Texcoord;
-
- uniform sampler2D U_BaseTexture;
- uniform sampler2D U_BlendTexture;
-
- void main()
- {
- vec4 blendColor=texture2D(U_BlendTexture,V_Texcoord);
- vec4 baseColor=texture2D(U_BaseTexture,V_Texcoord);
- //r,g,b,a
- gl_FragColor=blendColor*baseColor;
- }
逆正片叠底shader
- varying vec2 V_Texcoord;
-
- uniform sampler2D U_BaseTexture;
- uniform sampler2D U_BlendTexture;
-
- void main()
- {
- vec4 blendColor=texture2D(U_BlendTexture,V_Texcoord);
- vec4 baseColor=texture2D(U_BaseTexture,V_Texcoord);
- //r,g,b,a
- gl_FragColor=vec4(1.0)-((vec4(1.0)-blendColor)*(vec4(1.0)-baseColor));
- }
颜色加深shader
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。