当前位置:网站首页>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
边栏推荐
- GPT-3当一作自己研究自己,已投稿,在线蹲一个同行评议
- Optimization cases of complex factor calculation: deep imbalance, buying and selling pressure index, volatility calculation
- Summer 2022 daily question 1 (1)
- map和set的实现
- MySQL storage engine
- 力扣------路径总和 III
- Que savez - vous de la sérialisation et de l'anti - séquence?
- 1200.Minimum Absolute Difference
- The most complete learning rate adjustment strategy in history LR_ scheduler
- Codeworks 5 questions per day (1700 average) - day 7
猜你喜欢
On file uploading of network security
web服务性能监控方案
Tencent cloud native database tdsql-c was selected into the cloud native product catalog of the Academy of communications and communications
codeforces每日5题(均1700)-第七天
Que savez - vous de la sérialisation et de l'anti - séquence?
Mobile measurement and depth link platform - Branch
What is the experience of maintaining Wanxing open source vector database
Antd Comment 递归循环评论
Simple implementation of AVL tree insertion and verification operations
Redis configuration and optimization of NoSQL
随机推荐
自适应非欧表征广告检索系统AMCAD
Gpt-3 is a peer review online when it has been submitted for its own research
[hcie TAC] question 3
数据的存储
Kotlin Android 环境搭建
R data analysis: how to predict Cox model and reproduce high score articles
Restcloud ETL Community Edition June featured Q & A
23. (ArcGIS API for JS) ArcGIS API for JS ellipse collection (sketchviewmodel)
How to customize the shortcut key for latex to stop running
Codeworks 5 questions per day (1700 average) - day 7
预处理——插值
Introduction to opensea platform developed by NFT trading platform (I)
Class constant pool and runtime constant pool
二叉搜索树的实现
termux设置电脑连接手机。(敲打命令贼快),手机termux端口8022
About Confidence Intervals
Optimization cases of complex factor calculation: deep imbalance, buying and selling pressure index, volatility calculation
大白话高并发(二)
Search of linear table
About Tolerance Intervals