mie skybox no longer uses non-standard uniform default value
parent
959f988836
commit
a20b0b73ad
|
@ -32,7 +32,7 @@ exit
|
||||||
|
|
||||||
:windows
|
:windows
|
||||||
|
|
||||||
if "%1"=="" MAKE.bat demo_ui.c
|
if "%1"=="" MAKE.bat demo_collide.c
|
||||||
|
|
||||||
del index.html 2>NUL >NUL
|
del index.html 2>NUL >NUL
|
||||||
del index.worker.js 2>NUL >NUL
|
del index.worker.js 2>NUL >NUL
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
int paused;
|
int paused;
|
||||||
camera_t cam;
|
camera_t cam;
|
||||||
skybox_t sky;
|
|
||||||
|
|
||||||
void game_loop(void *userdata) {
|
void game_loop(void *userdata) {
|
||||||
// key handler
|
// key handler
|
||||||
|
@ -611,8 +610,6 @@ int main(void) {
|
||||||
// camera that points to origin
|
// camera that points to origin
|
||||||
cam = camera();
|
cam = camera();
|
||||||
|
|
||||||
sky = skybox(0, 0);
|
|
||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
window_loop(game_loop, NULL);
|
window_loop(game_loop, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
uniform vec3 uSunPos = vec3( 0, 0.1, -1 ); // = [0, Math.cos(theta) * 0.3 + 0.2, -1];
|
uniform vec3 uSunPos;// = vec3( 0, 0.1, -1 ); // = [0, Math.cos(theta) * 0.3 + 0.2, -1];
|
||||||
|
|
||||||
|
|
||||||
in vec3 v_direction;
|
in vec3 v_direction;
|
||||||
|
|
|
@ -333729,7 +333729,7 @@ void vfs_reload() {
|
||||||
array_resize(vfs_entries, 0); // @leak
|
array_resize(vfs_entries, 0); // @leak
|
||||||
|
|
||||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||||
#if 0
|
#if defined(EMSCRIPTEN)
|
||||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||||
|
@ -341700,6 +341700,10 @@ skybox_t skybox(const char *asset, int flags) {
|
||||||
sky.cubemap = cubemap6( images, 0 );
|
sky.cubemap = cubemap6( images, 0 );
|
||||||
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// set up mie defaults
|
||||||
|
shader_bind(sky.program);
|
||||||
|
shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sky;
|
return sky;
|
||||||
|
|
|
@ -515,7 +515,7 @@ void vfs_reload() {
|
||||||
array_resize(vfs_entries, 0); // @leak
|
array_resize(vfs_entries, 0); // @leak
|
||||||
|
|
||||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||||
#if 0
|
#if defined(EMSCRIPTEN)
|
||||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||||
|
|
|
@ -2395,6 +2395,10 @@ skybox_t skybox(const char *asset, int flags) {
|
||||||
sky.cubemap = cubemap6( images, 0 );
|
sky.cubemap = cubemap6( images, 0 );
|
||||||
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// set up mie defaults
|
||||||
|
shader_bind(sky.program);
|
||||||
|
shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sky;
|
return sky;
|
||||||
|
|
|
@ -4637,7 +4637,7 @@ void vfs_reload() {
|
||||||
array_resize(vfs_entries, 0); // @leak
|
array_resize(vfs_entries, 0); // @leak
|
||||||
|
|
||||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||||
#if 0
|
#if defined(EMSCRIPTEN)
|
||||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||||
|
@ -12608,6 +12608,10 @@ skybox_t skybox(const char *asset, int flags) {
|
||||||
sky.cubemap = cubemap6( images, 0 );
|
sky.cubemap = cubemap6( images, 0 );
|
||||||
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// set up mie defaults
|
||||||
|
shader_bind(sky.program);
|
||||||
|
shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sky;
|
return sky;
|
||||||
|
|
Loading…
Reference in New Issue