当前位置:网站首页>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
边栏推荐
- 如何检测mysql代码运行是否出现死锁+binlog查看
- idea gradle lombok 报错集锦
- PHP lightweight Movie Video Search Player source code
- 【knife-4j 快速搭建swagger】
- web服务性能监控方案
- Do you choose pandas or SQL for the top 1 of data analysis in your mind?
- [security attack and Defense] how much do you know about serialization and deserialization?
- It's too convenient. You can complete the code release and approval by nailing it!
- About Confidence Intervals
- 浅谈网络安全之文件上传
猜你喜欢
卡尔曼滤波-1
API data interface of A-share index component data
Codeworks 5 questions per day (1700 average) - day 7
[hcie TAC] question 3
Kbone与小程序跨端开发的一些思考
25. (ArcGIS API for JS) ArcGIS API for JS line modification line editing (sketchviewmodel)
QT 项目 表格新建列名称设置 需求练习(找数组消失的数字、最大值)
[development software] tilipa Developer Software
On file uploading of network security
ABAP 動態內錶分組循環
随机推荐
浅谈网络安全之文件上传
Native MySQL
On file uploading of network security
【knife-4j 快速搭建swagger】
Termux set up the computer to connect to the mobile phone. (knock the command quickly), mobile phone termux port 8022
Confirm the future development route! Digital economy, digital transformation, data This meeting is very important
HW notes (II)
Implementation of binary search tree
One of oscp tools: dirsearch usage Encyclopedia
接口数据安全保证的10种方式
codeforces每日5题(均1700)-第七天
未来发展路线确认!数字经济、数字化转型、数据...这次会议很重要
Mysql-数据丢失,分析binlog日志文件
预处理——插值
ABAP 动态内表分组循环
Que savez - vous de la sérialisation et de l'anti - séquence?
史上最全学习率调整策略lr_scheduler
Top 50 hit industry in the first half of 2022
web服务性能监控方案
Delete data in SQL