当前位置:网站首页>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
边栏推荐
- MySQL21-用户与权限管理
- MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
- What is the current situation of the game industry in the Internet world?
- First blog
- C miscellaneous shallow copy and deep copy
- Technology | diverse substrate formats
- MySQL combat optimization expert 05 production experience: how to plan the database machine configuration in the real production environment?
- MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
- [leectode 2022.2.13] maximum number of "balloons"
- C language string function summary
猜你喜欢
A necessary soft skill for Software Test Engineers: structured thinking
数据库中间件_Mycat总结
Jar runs with error no main manifest attribute
MySQL combat optimization expert 12 what does the memory data structure buffer pool look like?
Complete web login process through filter
实现以form-data参数发送post请求
Pytorch RNN actual combat case_ MNIST handwriting font recognition
16 medical registration system_ [order by appointment]
MySQL27-索引優化與查詢優化
ByteTrack: Multi-Object Tracking by Associating Every Detection Box 论文阅读笔记()
随机推荐
MySQL30-事务基础知识
What is the difference between TCP and UDP?
MySQL 29 other database tuning strategies
[C language] deeply analyze the underlying principle of data storage
MySQL22-逻辑架构
MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine
第一篇博客
Anaconda3 安装cv2
If someone asks you about the consistency of database cache, send this article directly to him
Adaptive Bezier curve network for real-time end-to-end text recognition
MySQL27-索引优化与查询优化
Baidu Encyclopedia data crawling and content classification and recognition
pytorch的Dataset的使用
C miscellaneous two-way circular linked list
MySQL ERROR 1040: Too many connections
好博客好资料记录链接
Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
[untitled]
Implement sending post request with form data parameter
PyTorch RNN 实战案例_MNIST手写字体识别