MMDLoader-app icon indicating copy to clipboard operation
MMDLoader-app copied to clipboard

why splash is not rendered

Open jomin398 opened this issue 1 year ago • 0 comments

i tryed to migrate gpu water to nowdays three module. i cant manage water splash. (why splash is not rendered?)

the water and mesh (model) is rendered properly.

// pass 1: render reflection to renderTarget for water

                camera.updateMatrixWorld(true);

                reflectionCamera.matrix.copy(reflectionMatrix).multiply(camera.matrix);
                reflectionCamera.matrix.decompose(reflectionCamera.position, reflectionCamera.quaternion, reflectionCamera.scale);

                mesh.visible = true;
                water.visible = false;
                splash.visible = false;
                //renderer.setFaceCulling(THREE.CullFaceFront);
                effect.render(scene, reflectionCamera, renderTarget);

                //renderer.setFaceCulling(THREE.CullFaceBack);
                // pass 2: render model

                mesh.visible = true;
                water.visible = false;
                splash.visible = false;

                effect.render(scene, camera);

                // pass 3: render water and splash

                mesh.visible = false;
                water.visible = true;
                splash.visible = true;

                renderer.autoClear = false;
                
                renderer.render(scene, camera);
                // just in case restore the parameters

                renderer.autoClear = true;

                mesh.visible = true;
                water.visible = true;
                splash.visible = true;

jomin398 avatar Sep 10 '23 04:09 jomin398