当前位置:网站首页>OpeGL personal notes - lights
OpeGL personal notes - lights
2022-07-07 22:09:00 【qq_ fifty-seven million two hundred and fifty-one thousand thre】
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTexCoords;out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoords;uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;void main()
{
FragPos = vec3(model * vec4(aPos, 1.0));
Normal = mat3(transpose(inverse(model))) * aNormal;
TexCoords = aTexCoords;
gl_Position = projection * view * vec4(FragPos, 1.0);
}
#version 330 core
out vec4 FragColor;struct Material {
sampler2D diffuse;
sampler2D specular;
sampler2D face;
float shininess;
};struct DirLight {
vec3 direction;vec3 ambient;
vec3
边栏推荐
- 三元表达式、各生成式、匿名函数
- Meta force force meta universe system development fossage model
- [open source] Net ORM accessing Firebird database
- Magic weapon - sensitive file discovery tool
- ISO 26262 - considerations other than requirements based testing
- ByteDance Android interview, summary of knowledge points + analysis of interview questions
- How to quickly check whether the opening area ratio of steel mesh conforms to ipc7525
- Embedded development: how to choose the right RTOS for the project?
- Goal: do not exclude yaml syntax. Try to get started quickly
- How to write an augmented matrix into TXT file
猜你喜欢
L2: current situation, prospects and pain points of ZK Rollup
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
ByteDance Android interview, summary of knowledge points + analysis of interview questions
[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
强化学习-学习笔记9 | Multi-Step-TD-Target
Validutil, "Rethinking the setting of semi supervised learning on graphs"
[JDBC Part 1] overview, get connection, CRUD
NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?
Goal: do not exclude yaml syntax. Try to get started quickly
随机推荐
Jenkins user rights management
How much does it cost to develop a small program mall?
The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
How to quickly check whether the opening area ratio of steel mesh conforms to ipc7525
Meta force force meta universe system development fossage model
嵌入式开发:如何为项目选择合适的RTOS?
Tcp/ip protocol stack
SAR影像质量评估
Use camunda to do workflow design and reject operations
The little money made by the program ape is a P!
Kirin Xin'an operating system derivative solution | storage multipath management system, effectively improving the reliability of data transmission
NVR硬盤錄像機通過國標GB28181協議接入EasyCVR,設備通道信息不顯示是什麼原因?
应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
Ten thousand word summary data storage, three knowledge points
Paint basic graphics with custompaint
反爬通杀神器
Jerry's power on automatic pairing [chapter]
PDF文档签名指南
[C language] advanced pointer --- do you really understand pointer?
Node:504 error reporting