当前位置:网站首页>API learning of OpenGL (2002) smooth flat of glsl
API learning of OpenGL (2002) smooth flat of glsl
2022-07-06 10:36:00 【hankern】
use flat When coloring ,OpenGL The color of a vertex in the entity will be used to render the entire entity , Usually, the color of the first or last vertex of the entity will be selected as the color of the entity .
In the use of smooth When coloring ,OpenGL The color of each vertex in the entity will be processed independently . For segment entities , The color of each point on the line segment will be obtained by interpolation according to the color of the two vertices . For polygon primitives , The color of the inner region of the polygon will be interpolated according to the color of all vertices .
1、smooth Of glsl
The vertices
smooth out vec3 FrontColor;
smooth out vec3 BackColor;
fragment
smooth in vec3 FrontColor;
smooth in vec3 BackColor;
effect
2、flat Of glsl
The vertices
flat out vec3 FrontColor;
flat out vec3 BackColor;
fragment
flat in vec3 FrontColor;
flat in vec3 BackColor;
effect
边栏推荐
- Preliminary introduction to C miscellaneous lecture document
- MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
- Pytorch LSTM实现流程(可视化版本)
- [after reading the series of must know] one of how to realize app automation without programming (preparation)
- Mysql33 multi version concurrency control
- MySQL23-存儲引擎
- 13 medical registration system_ [wechat login]
- MySQL27-索引優化與查詢優化
- 16 medical registration system_ [order by appointment]
- 百度百科数据爬取及内容分类识别
猜你喜欢
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
【C语言】深度剖析数据存储的底层原理
数据库中间件_Mycat总结
软件测试工程师必备之软技能:结构化思维
Database middleware_ MYCAT summary
Typescript入门教程(B站黑马程序员)
MySQL35-主从复制
If someone asks you about the consistency of database cache, send this article directly to him
MySQL31-MySQL事务日志
MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
随机推荐
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
Simple solution to phpjm encryption problem free phpjm decryption tool
MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
好博客好资料记录链接
Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
实现以form-data参数发送post请求
Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
[leectode 2022.2.13] maximum number of "balloons"
14 medical registration system_ [Alibaba cloud OSS, user authentication and patient]
Adaptive Bezier curve network for real-time end-to-end text recognition
MySQL實戰優化高手08 生產經驗:在數據庫的壓測過程中,如何360度無死角觀察機器性能?
Security design verification of API interface: ticket, signature, timestamp
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
Bytetrack: multi object tracking by associating every detection box paper reading notes ()
MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
Software test engineer development planning route
MySQL34-其他数据库日志
MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
Solve the problem of remote connection to MySQL under Linux in Windows
MySQL实战优化高手09 生产经验:如何为生产环境中的数据库部署监控系统?