当前位置:网站首页>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.
边栏推荐
- 【JDBC Part 1】概述、获取连接、CRUD
- Magic weapon - sensitive file discovery tool
- Solve the problem of uni in uni app Request sent a post request without response.
- 客户案例|华律网,通过观测云大幅缩短故障定位时间
- SAR影像质量评估
- Tsconfig of typescript TS basics JSON configuration options
- Pre sale 179000, hengchi 5 can fire? Product power online depends on how it is sold
- Google SEO external chain backlinks research tool recommendation
- 23. Merge K ascending linked lists -c language
- It's worth seeing. Interview sites and interview skills
猜你喜欢
Win11游戏模式怎么开启?Win11开启游戏模式的方法
100million single men and women "online dating", supporting 13billion IPOs
The little money made by the program ape is a P!
Matplotlib drawing interface settings
Preparing for the interview and sharing experience
Navicat connect 2002 - can't connect to local MySQL server through socket '/var/lib/mysql/mysql Sock 'solve
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?
Anti climbing killer
[开源] .Net ORM 访问 Firebird 数据库
Two kinds of updates lost and Solutions
随机推荐
NVR硬盤錄像機通過國標GB28181協議接入EasyCVR,設備通道信息不顯示是什麼原因?
Win11时间怎么显示星期几?Win11怎么显示今天周几?
Record a garbled code during servlet learning
TCP/IP 协议栈
Reinforcement learning - learning notes 8 | Q-learning
Leetcode SQL first day
JNI primary contact
Song list 11111
The difference between NPM uninstall and RM direct deletion
Implementation method of data platform landing
Paint basic graphics with custompaint
[C language] advanced pointer --- do you really understand pointer?
Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted
Node:504 error reporting
Lingyun going to sea | saihe & Huawei cloud: jointly help the sustainable development of cross-border e-commerce industry
Demon daddy A1 speech listening initial challenge
Jenkins user rights management
MIT6.S081-Lab9 FS [2021Fall]
Validutil, "Rethinking the setting of semi supervised learning on graphs"