17 lines
594 B
Bash
Executable file
17 lines
594 B
Bash
Executable file
#!/bin/bash
|
|
|
|
rm -r output
|
|
|
|
mkdir -p output
|
|
|
|
name=$( basename "$1" .hdr )
|
|
|
|
cargo run --release -- -i "$1" -o output/"$name"_rotated.hdr
|
|
|
|
cd output
|
|
|
|
magick "$name"_rotated.hdr debug.png
|
|
|
|
ibl-sampler-cli -inputPath "$name"_rotated.hdr -outCubeMap "$name"_specular.ktx2 -distribution GGX -cubeMapResolution 512
|
|
ibl-sampler-cli -inputPath "$name"_rotated.hdr -outCubeMap "$name"_diffuse.ktx2 -distribution Lambertian -cubeMapResolution 32
|
|
bevy_mod_environment_map_tools --inputs "$name"_diffuse.ktx2,"$name"_specular.ktx2 --outputs "$name"_diffuse_rgb9e5_zstd.ktx2,"$name"_specular_rgb9e5_zstd.ktx2
|