add scene render system, add proper HDR environments, try load texture from mesh file

This commit is contained in:
2025-11-30 20:12:57 +08:00
parent 4cdd405ba9
commit 0d4024be39
62 changed files with 2302 additions and 1037 deletions

View File

@ -0,0 +1,33 @@
// Skybox shader
#type vertex
#version 430
layout(location = 0) in vec3 a_Position;
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;
uniform float u_TextureLod;
in vec3 v_Position;
void main()
{
finalColor = textureLod(u_Texture, v_Position, u_TextureLod);
}