当前位置:网站首页>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
边栏推荐
- Security design verification of API interface: ticket, signature, timestamp
- MySQL26-性能分析工具的使用
- [programmers' English growth path] English learning serial one (verb general tense)
- Bytetrack: multi object tracking by associating every detection box paper reading notes ()
- Moteur de stockage mysql23
- What is the current situation of the game industry in the Internet world?
- MySQL27-索引优化与查询优化
- Mysql27 index optimization and query optimization
- MySQL31-MySQL事务日志
- MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
猜你喜欢
MySQL24-索引的数据结构
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
Download and installation of QT Creator
MySQL35-主从复制
高并发系统的限流方案研究,其实限流实现也不复杂
C miscellaneous shallow copy and deep copy
Nanny hand-in-hand teaches you to write Gobang in C language
The underlying logical architecture of MySQL
Case identification based on pytoch pulmonary infection (using RESNET network structure)
保姆级手把手教你用C语言写三子棋
随机推荐
Bytetrack: multi object tracking by associating every detection box paper reading notes ()
Good blog good material record link
MySQL24-索引的数据结构
① BOKE
MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
Mysql36 database backup and recovery
MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
MNIST implementation using pytoch in jupyter notebook
MySQL combat optimization expert 07 production experience: how to conduct 360 degree dead angle pressure test on the database in the production environment?
Case identification based on pytoch pulmonary infection (using RESNET network structure)
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
A necessary soft skill for Software Test Engineers: structured thinking
Global and Chinese markets for aprotic solvents 2022-2028: Research Report on technology, participants, trends, market size and share
Mysql32 lock
高并发系统的限流方案研究,其实限流实现也不复杂
[paper reading notes] - cryptographic analysis of short RSA secret exponents
What is the difference between TCP and UDP?
[after reading the series] how to realize app automation without programming (automatically start Kwai APP)
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
Mysql27 index optimization and query optimization