Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why splash is not rendered #7

Open
jomin398 opened this issue Sep 10, 2023 · 0 comments
Open

why splash is not rendered #7

jomin398 opened this issue Sep 10, 2023 · 0 comments

Comments

@jomin398
Copy link

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant