ambiant light

This commit is contained in:
Adrien MALINGREY 2023-06-04 01:01:43 +02:00
parent 8b10df1102
commit 8c263b727f

View File

@ -205,6 +205,7 @@ function updateSun() {
sky.material.uniforms[ 'sunPosition' ].value.copy( sun ); sky.material.uniforms[ 'sunPosition' ].value.copy( sun );
ocean.material.uniforms[ 'sunDirection' ].value.copy( sun ).normalize(); ocean.material.uniforms[ 'sunDirection' ].value.copy( sun ).normalize();
ambientLight.intensity = 0.5 + Math.max( elevation, 0 )/Math.PI;
if ( elevation >= 0 ) { if ( elevation >= 0 ) {