Implement HDRI skybox support

This commit is contained in:
reo 2025-09-26 22:44:43 +03:00
parent 44489f9fe3
commit 1e9b997aeb
12 changed files with 282 additions and 17 deletions

View file

@ -17,6 +17,7 @@ vec2 sample_spherical_map(vec3 v) {
void main() {
vec2 uv = sample_spherical_map(normalize(direction));
uv.y = 1.0 - uv.y;
vec3 color = texture(equirect, uv).rgb;
frag_color = vec4(color, 1.0);
}