当前位置:网站首页>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.
边栏推荐
- Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
- Google SEO external chain backlinks research tool recommendation
- It's worth seeing. Interview sites and interview skills
- Codemail auto collation code of visual studio plug-in
- Embedded development: how to choose the right RTOS for the project?
- Crawler (17) - Interview (2) | crawler interview question bank
- Debugging and handling the problem of jamming for about 30s during SSH login
- Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
- How does win11 unblock the keyboard? Method of unlocking keyboard in win11
- SAR image quality evaluation
猜你喜欢

DNS series (I): why does the updated DNS record not take effect?

ISO 26262 - considerations other than requirements based testing

使用 BlocConsumer 同时构建响应式组件和监听状态

强化学习-学习笔记9 | Multi-Step-TD-Target

Dry goods sharing | devaxpress v22.1 original help document download collection

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

Wechat official account oauth2.0 authorizes login and displays user information

Crawler (17) - Interview (2) | crawler interview question bank

Index summary (assault version)

The strongest installation of the twin tower model, Google is playing "antique" again?
随机推荐
South China x99 platform chicken blood tutorial
Dry goods sharing | devaxpress v22.1 original help document download collection
Code of "digital image processing principle and Practice (matlab version)" part2[easy to understand]
Reptile combat (VII): pictures of the king of reptiles' heroes
Win11U盘不显示怎么办?Win11插U盘没反应的解决方法
How to make agile digital transformation strategy for manufacturing enterprises
Solve the problem of uni in uni app Request sent a post request without response.
How to turn on win11 game mode? How to turn on game mode in win11
Oracle advanced (VI) Oracle expdp/impdp details
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?
Ternary expressions, generative expressions, anonymous functions
Which futures company is the safest to open a futures account?
NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?
[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
[open source] Net ORM accessing Firebird database
npm uninstall和rm直接删除的区别
[开源] .Net ORM 访问 Firebird 数据库
Jerry's fast pairing does not support canceling pairing [article]
Win11时间怎么显示星期几?Win11怎么显示今天周几?