-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Examples: Fixed pixel ratio computation in some post-processing examples. #16393
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
Conversation
|
Can you please explain your reasoning for this pattern? var newWidth = Math.floor( width * pixelRatio ) || 1;
var newHeight = Math.floor( height * pixelRatio ) || 1;
renderer.setSize( width, height );
composer.setSize( newWidth, newHeight );In #16388 you used this pattern: renderer.setSize( width, height );
composer.setSize( width, height ); |
|
I've done this because Against this backdrop, I've tested various approaches on my computer and I think introducing What do you think about this idea? |
|
The short answer is I am glad you are looking at this and I agree that something needs to be done.
They don't pertain to this PR. I am not sure what your point is.
I do not like using "there might be" a use case as a reason. On the other hand, I don't feel strongly one way or the other. I certainly support you trying. |
|
To me, this is the core problem: What are the units of the args in To me, the answer is CSS pixels. What are the units of the args in Device pixels? Actually, we get to decide. What is it? |
Right now, it's device pixels. Ideally,
Well, my wording was a bit unfortunate. The ability to scale the resolution is definitely a proper requirement.
I think I made myself clear. The PR removes an inconsistency and does not conflict with others. |
|
Thanks! |
EffectComposer has nothing to do with CSS and should not be sized in CSS units. |
I don't think it makes sense to divide
widthandheightthrough the pixel ratio. Similar to the SMAA example, a multiplication is required:three.js/examples/webgl_postprocessing_smaa.html
Lines 96 to 99 in 62a284a