码迷,mamicode.com
首页 >  
搜索关键字:texture2d    ( 74个结果
基于Qt的OpenGL可编程管线学习(14)- 正片叠底、逆正片叠底
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
基于Qt的OpenGL可编程管线学习(14)- 正片叠底、逆正片叠底
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
基于Qt的OpenGL可编程管线学习(13)- 变亮变暗
图片混合变亮与变暗的效果,如下图所示变暗效果变亮效果变亮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
基于Qt的OpenGL可编程管线学习(15)- 颜色加深、颜色减淡、想家相减
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
基于Qt的OpenGL可编程管线学习(14)- 正片叠底、逆正片叠底
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
设置texture
//获取内部资源贴图 public void setInsideTexture() { Texture2D texture = Resources.Load(texture_url) as Texture2D; Renderer renderer = GetComponent(); renderer... ...
分类:其他好文   时间:2017-04-15 13:50:54    阅读次数:227
[编辑器]Unity批量处理图片
加载图片,将其画在一张RenderTexture中,再新建一张Texture2D,从rt中读出来处理过的数据,再存进原路径中, 比如要将所有图片扩大1.5倍: 为防止重复编辑,可以在userdata中添加标志: ...
分类:编程语言   时间:2017-04-04 11:55:39    阅读次数:293
干货:Unity游戏开发图片纹理压缩方案
原文:http://www.jianshu.com/p/f7c3741f22afUnity3D引擎对纹理的处理是智能的:不论你放入的是PNG,PSD还是TGA,它们都会被自动转换成Unity自己的Texture2D格式。在Texture2D的设置选项中,你可以针对不同的平台,设置不同的压缩格式,如IOS设置成PVRTC4,Android平台设置成R..
分类:编程语言   时间:2017-02-13 14:23:22    阅读次数:236
一步步学OpenGL(20) -《点光源》
教程 20点光源原文: http://ogldev.atspace.co.uk/www/tutorial20/tutorial20.htmlCSDN完整版专栏: http://blog.csdn.ne...
分类:其他好文   时间:2016-11-19 21:21:21    阅读次数:583
在cocos2d中添加自己的shader教程
mark下:转载:http://www.cocoachina.com/bbs/read.php?tid=220630 1.cocos2d的shader都是共用的, 存放在 GLProgramCache 中。 当setGLProgram() 的时候是从GLProgramStateCache 中寻找是否 ...
分类:其他好文   时间:2016-11-18 18:02:59    阅读次数:315
74条   上一页 1 ... 3 4 5 6 7 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!