当前位置:网站首页>Unity3D在一建筑GL材料可以改变颜色和显示样本
Unity3D在一建筑GL材料可以改变颜色和显示样本
2022-07-06 21:26:00 【全栈程序员站长】
大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。
void CreateLineMaterial() { if (!mat) { mat = new Material(“Shader \”Lines/Colored Blended\” {” + “SubShader { Pass { ” + ” Blend SrcAlpha OneMinusSrcAlpha ” + ” ZWrite Off Cull Off Fog { Mode Off } ” + ” BindChannels {” + ” Bind \”vertex\”, vertex Bind \”color\”, color }” + “} } }”); mat.hideFlags = HideFlags.HideAndDontSave; mat.shader.hideFlags = HideFlags.HideAndDontSave; } }
void OnPostRender() { if (!mat) { CreateLineMaterial(); return; } GL.PushMatrix(); mat.SetPass(0); GL.LoadOrtho(); GL.Begin(GL.QUADS); GL.Color(Color.red); GL.Vertex3(0, 0.5F, 0); GL.Vertex3(0.5F, 1, 0); GL.Vertex3(1, 0.5F, 0); GL.Vertex3(0.5F, 0, 0); GL.Color(Color.cyan); GL.Vertex3(0, 0, 0); GL.Vertex3(0, 0.25F, 0); GL.Vertex3(0.25F, 0.25F, 0); GL.Vertex3(0.25F, 0, 0); GL.End(); GL.PopMatrix(); }
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/116697.html原文链接:https://javaforall.cn
边栏推荐
- map和set的实现
- QT thread and other 01 concepts
- 使用切面实现记录操作日志
- Antd Comment 递归循环评论
- Docker部署Mysql8的实现步骤
- Implementation steps of docker deploying mysql8
- QT 使用QToolTip 鼠标放上去显示文字时会把按钮的图片也显示了、修改提示文字样式
- 我的勇敢对线之路--详细阐述,浏览器输入URL发生了什么
- . Net interface can be implemented by default
- Confirm the future development route! Digital economy, digital transformation, data This meeting is very important
猜你喜欢

卡尔曼滤波-1

复杂因子计算优化案例:深度不平衡、买卖压力指标、波动率计算

Que savez - vous de la sérialisation et de l'anti - séquence?

自适应非欧表征广告检索系统AMCAD

NoSQL之Redis配置与优化

cuda编程

我的勇敢对线之路--详细阐述,浏览器输入URL发生了什么

QT 打开文件 使用 QFileDialog 获取文件名称、内容等

Optimization cases of complex factor calculation: deep imbalance, buying and selling pressure index, volatility calculation

ggplot 分面的细节调整汇总
随机推荐
【DPDK】dpdk样例源码解析之三:dpdk-l3fwd_001
一些常用软件相关
Force buckle ----- path sum III
Kbone与小程序跨端开发的一些思考
运算放大器应用汇总1
Some thoughts on cross end development of kbone and applet
链表面试常见题
When QT uses qtooltip mouse to display text, the picture of the button will also be displayed and the prompt text style will be modified
Enter the rough outline of the URL question (continuously updated)
Gpt-3 is a peer review online when it has been submitted for its own research
Web service performance monitoring scheme
AVL树插入操作与验证操作的简单实现
Arduino droplet detection
Adaptive non European advertising retrieval system amcad
接口数据安全保证的10种方式
【安全攻防】序列化与反序列,你了解多少?
二叉搜索树的实现
Restcloud ETL Community Edition June featured Q & A
Introduction to opensea platform developed by NFT trading platform (I)
web服务性能监控方案