码迷,mamicode.com
首页 >  
搜索关键字:texture2d    ( 74个结果
Effect
/////////////////////////////////shader source/////////////////////////////////Texture2D colorMap : register( t0 );SamplerState colorSampler : registe ...
分类:其他好文   时间:2017-06-13 00:06:32    阅读次数:211
Shader
///////////////Begin Shader Source File///////////////////// cbuffer cbChangesPerFrame : register( b0 ){ matrix mvp_;}; Texture2D colorMap_ : register ...
分类:其他好文   时间:2017-06-12 22:37:16    阅读次数:252
改变鼠标图标
using System.Collections;using System.Collections.Generic;using UnityEngine; public class CursorManager : MonoBehaviour { public static CursorManager ...
分类:其他好文   时间:2017-06-12 13:11:31    阅读次数:113
基于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:32:31    阅读次数:213
基于Qt的OpenGL可编程管线学习(12)- 图片正常混合
两个图片正常混合效果图fragmentShader//正常的颜色混合 uniformsampler2DU_MainTexture; uniformsampler2DU_SubTexture; varyingvec2M_coord; voidmain() { vec4blendColor=texture2D(U_SubTexture,M_coord); vec4baseColor=texture2D(U_MainTexture,M_coord); gl_FragColor..
分类:其他好文   时间:2017-06-01 00:32:23    阅读次数:191
基于Qt的OpenGL可编程管线学习(6)- 多重纹理
可以将多个纹理传给shader,下图是两个纹理叠加的效果shader中定义如下:uniformsampler2DU_MainTexture; uniformsampler2DU_SubTexture; varyingvec2M_coord; voidmain() { gl_FragColor=texture2D(U_SubTexture,M_coord)*0.8+ texture2D(U_MainTexture,M_coord)*0.2; }CUP中..
分类:其他好文   时间:2017-06-01 00:32:05    阅读次数:159
基于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:30:37    阅读次数:190
基于Qt的OpenGL可编程管线学习(17)- 差值、反差值、排除
1、差值shader//差值 uniformsampler2DU_MainTexture; uniformsampler2DU_SubTexture; varyingvec2M_coord; voidmain() { vec4blendColor=texture2D(U_SubTexture,M_coord); vec4baseColor=texture2D(U_MainTexture,M_coord); gl_FragColor=abs(vec4(blendColor.rgb-baseCol..
分类:其他好文   时间:2017-06-01 00:29:46    阅读次数:166
基于Qt的OpenGL可编程管线学习(17)- 差值、反差值、排除
1、差值shader//差值 uniformsampler2DU_MainTexture; uniformsampler2DU_SubTexture; varyingvec2M_coord; voidmain() { vec4blendColor=texture2D(U_SubTexture,M_coord); vec4baseColor=texture2D(U_MainTexture,M_coord); gl_FragColor=abs(vec4(blendColor.rgb-baseCol..
分类:其他好文   时间:2017-06-01 00:26:55    阅读次数:160
基于Qt的OpenGL可编程管线学习(16)- 柔光、强光、叠加
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
74条   上一页 1 2 3 4 5 6 ... 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!