当前位置:网站首页>OpenGL job - texture
OpenGL job - texture
2022-07-07 22:08:00 【qq_ fifty-seven million two hundred and fifty-one thousand thre】
One 、 Modify Clip shader , only Let the smiling face pattern look in the other direction
#version 330 core
out vec4 FragColor;in vec3 ourColor;
in vec2 TexCoord;uniform sampler2D texture1;
uniform sampler2D texture2;void main()
{
FragColor = mix(texture(texture1, TexCoord), texture(texture2, vec2(1-TexCoord.x, TexCoord.y)), 0.2);
}
Two 、 Try different texture wrapping methods , Set a from 0.0f To 2.0f Within the scope of ( Not the original 0.0f To 1.0f) Texture coordinates . See if you can put... In the corner of the box 4 A smiling face
float vertices[] = {
// ---- Location ---- ---- Color ---- - Texture coordinates -
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 2.0f, 2.0f, // The upper right
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, // The lower right
-0.5f, -0.5f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // The lower left
-0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 0.
边栏推荐
- Paint basic graphics with custompaint
- [colmap] sparse reconstruction is converted to mvsnet format input
- ISO 26262 - considerations other than requirements based testing
- Ternary expressions, generative expressions, anonymous functions
- Win11U盘不显示怎么办?Win11插U盘没反应的解决方法
- Automatic classification of defective photovoltaic module cells in electronic images
- Prometheus remote_ write InfluxDB,unable to parse authentication credentials,authorization failed
- Reinforcement learning - learning notes 8 | Q-learning
- 2022 how to evaluate and select low code development platforms?
- 用语雀写文章了,功能真心强大!
猜你喜欢
![Restapi version control strategy [eolink translation]](/img/65/decbc158f467ab8c8923c5947af535.png)
Restapi version control strategy [eolink translation]

What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk

谈谈制造企业如何制定敏捷的数字化转型策略

Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘

#DAYU200体验官#MPPT光伏发电项目 DAYU200、Hi3861、华为云IotDA
![[C language] advanced pointer --- do you really understand pointer?](/img/ee/79c0646d4f1bfda9543345b9da0f25.png)
[C language] advanced pointer --- do you really understand pointer?

L2: current situation, prospects and pain points of ZK Rollup

Goal: do not exclude yaml syntax. Try to get started quickly

Have you ever been confused? Once a test / development programmer, ignorant gadget C bird upgrade

Ten thousand word summary data storage, three knowledge points
随机推荐
QT compile IOT management platform 39 alarm linkage
23. Merge K ascending linked lists -c language
Jerry's about TWS pairing mode configuration [chapter]
2022 how to evaluate and select low code development platforms?
Which futures company is the safest to open a futures account?
Main functions of OS, Sys and random Standard Libraries
Demon daddy A1 speech listening initial challenge
[open source] Net ORM accessing Firebird database
An in-depth understanding of fp/fn/precision/recall
NVR hard disk video recorder is connected to easycvr through the national standard gb28181 protocol. What is the reason why the device channel information is not displayed?
嵌入式开发:如何为项目选择合适的RTOS?
Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
Open source OA development platform: contract management user manual
ISO 26262 - considerations other than requirements based testing
[C language] advanced pointer --- do you really understand pointer?
Index summary (assault version)
Restapi version control strategy [eolink translation]
What is the difference between the three values of null Nan undefined in JS
海外代理推荐
Reinforcement learning - learning notes 9 | multi step TD target