当前位置:网站首页>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.
边栏推荐
- operator
- NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?
- 23. Merge K ascending linked lists -c language
- 100million single men and women "online dating", supporting 13billion IPOs
- Song list 11111
- Google SEO external chain backlinks research tool recommendation
- Tupu digital twin coal mining system to create "hard power" of coal mining
- L2: current situation, prospects and pain points of ZK Rollup
- [advanced MySQL] index details (I): index data page structure
- 解决uni-app中uni.request发送POST请求没有反应。
猜你喜欢
Use blocconsumer to build responsive components and monitor status at the same time
嵌入式开发:如何为项目选择合适的RTOS?
Overseas agent recommendation
Google SEO external chain backlinks research tool recommendation
TCP/IP 协议栈
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?
Win11U盘不显示怎么办?Win11插U盘没反应的解决方法
648. Word replacement
[开源] .Net ORM 访问 Firebird 数据库
ISO 26262 - considerations other than requirements based testing
随机推荐
使用 BlocConsumer 同时构建响应式组件和监听状态
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
[colmap] sparse reconstruction is converted to mvsnet format input
Customer case | China law network, through observing the cloud, greatly shortens the time of fault location
Restapi version control strategy [eolink translation]
Jerry's fast pairing does not support canceling pairing [article]
Leetcode SQL first day
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?
Google SEO external chain backlinks research tool recommendation
The whole network "chases" Zhong Xuegao
What if the win11u disk does not display? Solution to failure of win11 plug-in USB flash disk
QT compile IOT management platform 39 alarm linkage
NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?
Demon daddy A1 speech listening initial challenge
Embedded development: how to choose the right RTOS for the project?
It's worth seeing. Interview sites and interview skills
The maximum number of meetings you can attend [greedy + priority queue]
Ten thousand word summary data storage, three knowledge points
cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
怎样写一个增广矩阵到txt文件中