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

ReflectorForSSRPass : Fixed feedback and improved robustness #21385

Merged
merged 5 commits into from
Mar 2, 2021
Merged

ReflectorForSSRPass : Fixed feedback and improved robustness #21385

merged 5 commits into from
Mar 2, 2021

Conversation

ycw
Copy link
Contributor

@ycw ycw commented Mar 2, 2021

Description

fixed illegal feedback.
fixed defines overwrite issue.
fixed shader prop. val of undefined.

@ycw ycw mentioned this pull request Mar 2, 2021
@mrdoob mrdoob added this to the r127 milestone Mar 2, 2021
renderer.render( scene, virtualCamera );
this.visible = true;
Copy link
Contributor

@gonnavis gonnavis Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should not control its own display or not within the Reflector, and deliberately commented out the original codes.
I still hope that the display of Reflector will be controlled by the outer code.

EDIT:
Because even after this change, we still can not delete this line of code outside reflector:

if ( this.groundReflector ) this.groundReflector.visible = false;

Otherwise will let the reflector keep showing and cause viewing error if we turn off it in the gui.
So I think totally controlled outside would be better.

@gonnavis
Copy link
Contributor

gonnavis commented Mar 2, 2021

I'm fine with. Many thanks!

Comment on lines 233 to 235
// this.visible = false;
renderer.render( scene, virtualCamera );
// this.visible = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gonnavis you're okay with leaving that commented code here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I'm just okay with the logic. I do feel it is not good to leave comments here, but I am afraid of making too many opinions, thinking
it may can be solved in the process of merge.

@ycw Could you please remove these comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Copy link
Contributor

@gonnavis gonnavis Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Hello @mrdoob , I think it's okay now.

@@ -382,10 +382,9 @@ SSRPass.prototype = Object.assign( Object.create( Pass.prototype ), {
renderer.setRenderTarget( this.beautyRenderTarget );
renderer.clear();
if ( this.groundReflector ) {

this.groundReflector.visible = false;
this.groundReflector.doRender( this.renderer, this.scene, this.camera );
this.groundReflector.visible = true;
Copy link
Contributor

@gonnavis gonnavis Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please restore the empty lines style too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mrdoob mrdoob changed the title ReflectorForSSRPass : fixed illegal feedback ReflectorForSSRPass : Fixed feedback and improved robustness Mar 2, 2021
@mrdoob mrdoob merged commit a529689 into mrdoob:dev Mar 2, 2021
@mrdoob
Copy link
Owner

mrdoob commented Mar 2, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants