当前位置: 首页 > news >正文

成都市网站建设_网站建设公司_自助建站_seo优化

昌平网站开发多少钱,网站上传照片失败,滨海天津网站建设,wordpress 内部函数如果要将精灵中所有形状的颜色更改为白色,则唯一的方法是使用像素着色器并将所有非黑色的片段设置为黑色(我假设黑色在您的游戏中呈现为透明) )到白色.像这样#xff1a;varying vec4 v_color;varying vec2 v_texCoords;uniform sampler2D u_texture;void main() {vec4 colorv…如果要将精灵中所有形状的颜色更改为白色,则唯一的方法是使用像素着色器并将所有非黑色的片段设置为黑色(我假设黑色在您的游戏中呈现为透明) )到白色.像这样varying vec4 v_color;varying vec2 v_texCoords;uniform sampler2D u_texture;void main() {vec4 colorv_color * texture2D(u_texture, v_texCoords);if(color.r!0 color.g!0 color.b!0){gl_FragColorvec4(1,1,1,1);}else{gl_FragColorcolor;}}如果您很不幸并且使用的是opengl 1.0(固定管道),我建议您现在就开始使用gles 2.0.固定管道是从90’开始的,我们现在是2013年编码初始化ShaderProgram.pedantic false;ShaderProgram defaultShaderSpriteBatch.createDefaultShader();ShaderProgram shaderWhiteTexturenew ShaderProgram(Gdx.files.internal(vertexShader.vs).readString(),Gdx.files.internal(fragShader.fs).readString());渲染//Render the textures with the normal colorsspriteBatch.begin();spriteBatch.draw(sprite1,sprite2,sprite3...);//or whatever code u use to render themspriteBatch.end();//Render the textures with the shaderspriteBatch.setShader(shaderWhiteTexture);spriteBatch.begin();spriteBatch.draw(sprite4,sprite5,sprite6...);//or whatever code u use to render themspriteBatch.end();spriteBatch.setShader(defaultShader);着色器//vertexShader.vs:attribute highp vec4 a_position;attribute highp vec4 a_color;attribute highp vec2 a_texCoord0;uniform mat4 u_projTrans;varying highp vec4 v_color;varying highp vec2 v_texCoords;void main() {v_color a_color;v_texCoords a_texCoord0;gl_Position u_projTrans * a_position ;}//fragShader.fs:varying highp vec4 v_color;varying highp vec2 v_texCoords;uniform sampler2D u_texture;void main() {gl_FragColor vec4(0.0);highp vec4 color texture2D(u_texture, v_texCoords);if(color.a 0.0) {gl_FragColor vec4(1.0,0,0,1.0);}}由问题所有者编辑现在可以使用透明纹理添加了什么 1 . the highp precision to variables2 . the fragmentShader file Main() fonction edited
http://www.ihoyoo.com/news/87808.html

相关文章:

  • php开源企业网站系统中山网站seo
  • 编程免费自学网站惠州网站建设是什么意思
  • 论坛网站制作费用广告设计制作公司名字
  • 阿里云做的网站程序员自己做网站吗
  • 做的阿里巴巴网站的放哪个科目珠海十大网站建设公司
  • 新浪网站制作济宁建站公司
  • 做律师事务所网站云南网站建设天锐科技
  • 网站设计好学吗销售人员培训课程有哪些
  • 如何做新网站保留域名如何寻找客户
  • 做广告公司网站建设驻马店做网站
  • 深圳珠宝网站建设临沧建设局网站
  • 买网站不给我备案包装设计怎么做
  • 响应式网站建设开发公司页面效果好的网站
  • 自助网站建设哪个好电商网站 设计方案
  • 做资源网站盈利点长春网站建设于健
  • 企业做网站有哪些好处如何做彩票网站信息
  • 韩顺平 开源网站专做畜牧招聘网站的
  • 自己做的网站能放到织梦上wordpress 件康
  • 临海市城乡建设规划局网站广州动画制作公司
  • 行业门户网站的优化怎么做yps行业门户系统新泰网络有限公司
  • 架设网站是自己架设服务器还是租服务器建站网站破解版
  • 有域名如何自己制作网站广东腾越建筑工程有限公司
  • 淘大象排名查询seo排名的影响因素有哪些
  • 网站色调代号建英文产品网站
  • 高端设计网站平台自己建一个网站需要多少钱?
  • 网站效果图怎么做自豪的wordpress
  • 房产网站流量排名网站应当实现那些功能 流程如何设计
  • 微机做网站的软件wordpress mysql 配置文件
  • 站内推广的方法wordpress setup-config.php空白
  • 向谷歌提交网站做图书馆网站模板