当前位置:网站首页>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
边栏推荐
- R data analysis: how to predict Cox model and reproduce high score articles
- Storage of data
- 运算放大器应用汇总1
- Free PHP online decryption tool source code v1.2
- 如何检测mysql代码运行是否出现死锁+binlog查看
- 24. (ArcGIS API for JS) ArcGIS API for JS point modification point editing (sketchviewmodel)
- 二进制、八进制、十六进制
- Leetcode: interview question 17.24 Maximum cumulative sum of submatrix (to be studied)
- idea gradle lombok 报错集锦
- 【knife-4j 快速搭建swagger】
猜你喜欢
复杂因子计算优化案例:深度不平衡、买卖压力指标、波动率计算
Implementation steps of docker deploying mysql8
ABAP 動態內錶分組循環
【安全攻防】序列化與反序列,你了解多少?
NoSQL之Redis配置与优化
[development software] tilipa Developer Software
Mysql-数据丢失,分析binlog日志文件
Kalman filter-1
你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?
Calculation of time and space complexity (notes of runners)
随机推荐
[security attack and Defense] how much do you know about serialization and deserialization?
Leetcode: interview question 17.24 Maximum cumulative sum of submatrix (to be studied)
Adaptive non European advertising retrieval system amcad
使用 Dumpling 备份 TiDB 集群数据到 GCS
Redis源码学习(31),字典学习,dict.c(一)
接口数据安全保证的10种方式
Top 50 hit industry in the first half of 2022
[hcie TAC] question 3
Kotlin Android 环境搭建
Probability formula
Redis源码学习(30),字典学习,dict.h
Do you choose pandas or SQL for the top 1 of data analysis in your mind?
使用 TiDB Lightning 恢复 GCS 上的备份数据
【mysql】mysql中行排序
Delete data in SQL
【开发软件】 tilipa开发者软件
什么是 BA ?BA怎么样?BA和BI是什么关系?
Docker部署Mysql8的实现步骤
PHP lightweight Movie Video Search Player source code
2022年上半年HIT行业TOP50