Implement HDRI skybox support
This commit is contained in:
parent
44489f9fe3
commit
1e9b997aeb
12 changed files with 282 additions and 17 deletions
BIN
assets/exr/citrus_orchard_road_puresky_4k.exr
(Stored with Git LFS)
Normal file
BIN
assets/exr/citrus_orchard_road_puresky_4k.exr
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/exr/qwantani_sunset_puresky_2k.exr
(Stored with Git LFS)
Normal file
BIN
assets/exr/qwantani_sunset_puresky_2k.exr
(Stored with Git LFS)
Normal file
Binary file not shown.
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue