add simple render, add simple pbr shader(from hazel)

This commit is contained in:
2025-11-26 17:48:04 +08:00
parent bade15a87f
commit 5bbda471bf
68 changed files with 10512 additions and 83 deletions

View File

@ -0,0 +1,33 @@
// Simple Textured Quad Shader
#type vertex
#version 430
layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec2 a_TexCoord;
uniform mat4 u_InverseVP;
out vec3 v_Position;
void main()
{
vec4 position = vec4(a_Position.xy, 1.0, 1.0);
gl_Position = position;
v_Position = (u_InverseVP * position).xyz;
}
#type fragment
#version 430
layout(location = 0) out vec4 finalColor;
uniform samplerCube u_Texture;
in vec3 v_Position;
void main()
{
finalColor = textureLod(u_Texture, v_Position, 0.0);
}