当前位置:网站首页>Shader Language
Shader Language
2022-07-07 15:41:00 【When can Xiaobai advance to success】
One 、 Simple rectangle
1、 Vertex shader
Below is a triangle vertex shader
#version 330 core
// input data aPos The input is a (x,y) Vector
// aColor It's a 4 Dimension vector
attribute vec2 aPos;
attribute vec4 aColor;
// Data output to clip shaders
out vec4 Color;
void main()
{
// color Not in vertex shaders , Direct output
Color=aColor;
// gl_Position It's a built-in function , Here is 4 Parameters ,x,y,z also alpha value , temporary alpha The value is 1
gl_Position = vec4(aPos, 0.0, 1.0);
}
2、 Fragment Shader
#version 330 core
// Input from vertex shader
in vec4 Color;
void main()
{
// gl_FragColor It's a built-in function , Here is 4 Parameters
gl_FragColor = Color;
}
This rectangle has only color , No texture .
边栏推荐
- Connecting FTP server tutorial
- Stm32f103c8t6 PWM drive steering gear (sg90)
- Nacos conformance protocol cp/ap/jraft/distro protocol
- OpenGL's distinction and understanding of VAO, VBO and EBO
- 【数字IC验证快速入门】19、SystemVerilog学习之基本语法6(线程内部通信...内含实践练习)
- 2022年5月互联网医疗领域月度观察
- 一大波开源小抄来袭
- [quick start of Digital IC Verification] 29. Ahb-sramc (9) (ahb-sramc svtb overview) of SystemVerilog project practice
- Unity之ASE实现全屏风沙效果
- 2. Heap sort "hard to understand sort"
猜你喜欢
![[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟](/img/38/cc5bb5eaa3dcee5ae2d51a904cf26a.png)
[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
![[Data Mining] Visual Pattern Mining: Hog Feature + cosinus Similarity / K - means Clustering](/img/a4/7320f5d266308f6003cc27964e49f3.png)
[Data Mining] Visual Pattern Mining: Hog Feature + cosinus Similarity / K - means Clustering

Super simple and fully automated generation super signature system (cloud Xiaoduo minclouds.com cloud service instance), free application in-house test app distribution and hosting platform, maintenan

The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
![[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)](/img/7e/188e57ee026200478a6f61eb507c92.png)
[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)

Ctfshow, information collection: web9

简述keepalived工作原理

Zhongang Mining: Fluorite continues to lead the growth of new energy market

【數字IC驗證快速入門】20、SystemVerilog學習之基本語法7(覆蓋率驅動...內含實踐練習)

Unity's ASE achieves full screen sand blowing effect
随机推荐
Points for attention in porting gd32 F4 series programs to gd32 F3 series
[deep learning] image hyperspectral experiment: srcnn/fsrcnn
Vertex shader to slice shader procedure, varying variable
使用cpolar建立一个商业网站(2)
Write a ten thousand word long article "CAS spin lock" to send Jay's new album to the top of the hot list
【数字IC验证快速入门】18、SystemVerilog学习之基本语法5(并发线程...内含实践练习)
[quick start of Digital IC Verification] 19. Basic grammar of SystemVerilog learning 6 (thread internal communication... Including practical exercises)
Do you know the relationship between the most important indicators of two strong wind control and the quality of the customer base
【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
Stm32f103c8t6 PWM drive steering gear (sg90)
[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)
【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)
2022全开源企业发卡网修复短网址等BUG_2022企业级多商户发卡平台源码
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
Whether runnable can be interrupted
2. 堆排序『较难理解的排序』
What are the safest securities trading apps
【数字IC验证快速入门】22、SystemVerilog项目实践之AHB-SRAMC(2)(AMBA总线介绍)
什么是pv和uv? pv、uv
连接ftp服务器教程