当前位置:网站首页>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.
边栏推荐
- #DAYU200体验官#MPPT光伏发电项目 DAYU200、Hi3861、华为云IotDA
- How polardb-x does distributed database hotspot analysis
- The little money made by the program ape is a P!
- The whole network "chases" Zhong Xuegao
- [开源] .Net ORM 访问 Firebird 数据库
- Jerry's manual matching method [chapter]
- Use json Stringify() to realize deep copy, be careful, there may be a huge hole
- Goal: do not exclude yaml syntax. Try to get started quickly
- Meta force force meta universe system development fossage model
- 为什么Win11不能显示秒数?Win11时间不显示秒怎么解决?
猜你喜欢

Magic weapon - sensitive file discovery tool

大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?

QT compile IOT management platform 39 alarm linkage

Use camunda to do workflow design and reject operations
![Jerry's about TWS channel configuration [chapter]](/img/94/fde5054fc412b786cd9864215e912c.png)
Jerry's about TWS channel configuration [chapter]

Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department

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

The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function

How to turn on win11 game mode? How to turn on game mode in win11

L2:ZK-Rollup的现状,前景和痛点
随机推荐
谈谈制造企业如何制定敏捷的数字化转型策略
Navicat connect 2002 - can't connect to local MySQL server through socket '/var/lib/mysql/mysql Sock 'solve
Jerry's power on automatic pairing [chapter]
100million single men and women "online dating", supporting 13billion IPOs
Actual combat: sqlserver 2008 Extended event XML is converted to standard table format [easy to understand]
Two kinds of updates lost and Solutions
PKPM 2020软件安装包下载及安装教程
海外代理推荐
How much does it cost to develop a small program mall?
Talk about relational database and serverless
Reinforcement learning - learning notes 9 | multi step TD target
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cyclic functions [chapter]
Nine degree 1201 - traversal of binary sort number - binary sort tree "suggestions collection"
L'enregistreur de disque dur NVR est connecté à easycvr par le Protocole GB 28181. Quelle est la raison pour laquelle l'information sur le canal de l'appareil n'est pas affichée?
The little money made by the program ape is a P!
Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
Overseas agent recommendation
如何实现横版游戏中角色的移动控制
【colmap】稀疏重建转为MVSNet格式输入
Relationship between URL and URI