当前位置:网站首页>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.
边栏推荐
- The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
- 双塔模型的最强出装,谷歌又开始玩起“老古董”了?
- Use br to back up tidb cluster data to azure blob storage
- Jerry's manual matching method [chapter]
- Debugging and handling the problem of jamming for about 30s during SSH login
- Win11U盘不显示怎么办?Win11插U盘没反应的解决方法
- #DAYU200体验官#MPPT光伏发电项目 DAYU200、Hi3861、华为云IotDA
- Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
- How to make agile digital transformation strategy for manufacturing enterprises
- Demon daddy A1 speech listening initial challenge
猜你喜欢

Use json Stringify() to realize deep copy, be careful, there may be a huge hole

Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?

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

ISO 26262 - considerations other than requirements based testing

Validutil, "Rethinking the setting of semi supervised learning on graphs"

Where is the big data open source project, one-stop fully automated full life cycle operation and maintenance steward Chengying (background)?

双塔模型的最强出装,谷歌又开始玩起“老古董”了?

null == undefined
![Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]](/img/14/1c8a70102c106f4631853ed73c4d82.png)
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]

Tcp/ip protocol stack
随机推荐
用语雀写文章了,功能真心强大!
Record a garbled code during servlet learning
23. Merge K ascending linked lists -c language
Can I open a stock account directly online now? Is it safe?
100million single men and women "online dating", supporting 13billion IPOs
Win11游戏模式怎么开启?Win11开启游戏模式的方法
How to integrate Google APIs with Google's application system (1) -introduction to Google APIs
Ten thousand word summary data storage, three knowledge points
Kirin Xin'an operating system derivative solution | storage multipath management system, effectively improving the reliability of data transmission
Actual combat: sqlserver 2008 Extended event XML is converted to standard table format [easy to understand]
Jerry's configuration of TWS cross pairing [article]
Win11如何解禁键盘?Win11解禁键盘的方法
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
【Azure微服务 Service Fabric 】如何转移Service Fabric集群中的种子节点(Seed Node)
[开源] .Net ORM 访问 Firebird 数据库
What is the difference between the three values of null Nan undefined in JS
South China x99 platform chicken blood tutorial
Arlo's troubles
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]
Tsconfig of typescript TS basics JSON configuration options