当前位置:网站首页>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

边栏推荐
- A necessary soft skill for Software Test Engineers: structured thinking
- Pytorch RNN actual combat case_ MNIST handwriting font recognition
- MySQL27-索引優化與查詢優化
- 百度百科数据爬取及内容分类识别
- [C language] deeply analyze the underlying principle of data storage
- Baidu Encyclopedia data crawling and content classification and recognition
- Preliminary introduction to C miscellaneous lecture document
- The underlying logical architecture of MySQL
- MySQL35-主从复制
- MySQL combat optimization expert 12 what does the memory data structure buffer pool look like?
猜你喜欢

MySQL26-性能分析工具的使用

Export virtual machines from esxi 6.7 using OVF tool

保姆级手把手教你用C语言写三子棋

Mysql27 index optimization and query optimization

MySQL real battle optimization expert 11 starts with the addition, deletion and modification of data. Review the status of buffer pool in the database

MySQL24-索引的数据结构

Pytorch RNN actual combat case_ MNIST handwriting font recognition

MySQL27-索引优化与查询优化

The underlying logical architecture of MySQL

Mysql24 index data structure
随机推荐
Google login prompt error code 12501
How to find the number of daffodils with simple and rough methods in C language
The underlying logical architecture of MySQL
Time complexity (see which sentence is executed the most times)
MySQL25-索引的创建与设计原则
Mysql27 index optimization and query optimization
15 medical registration system_ [appointment registration]
text 文本数据增强方法 data argumentation
使用OVF Tool工具从Esxi 6.7中导出虚拟机
pytorch的Dataset的使用
MySQL35-主从复制
MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
① BOKE
What should the redis cluster solution do? What are the plans?
Simple solution to phpjm encryption problem free phpjm decryption tool
Mysql26 use of performance analysis tools
Emotional classification of 1.6 million comments on LSTM based on pytoch
Software test engineer development planning route
13 medical registration system_ [wechat login]
Mysql30 transaction Basics