Skip to content

Request: Support for dynamically scalable effect resolution #192

@gkjohnson

Description

@gkjohnson

Hello! Great work on the effects.

It would be great to support dynamically scalable effect resolution for some of the more intensive effects or at least a fixed effect scale on instantiation. SSAO, for example, can be a bit expensive depending on how many samples you want to use but this can be improved by rendering it at half or quarter resolution. A depth / normal aware upscale might be needed afterward to remove some artifacts depending on the effect.

To explain a bit more in my application I iteratively increase / decrease the resolution of or enable / disable the effects based on the measured framerate of the web app. So if the application is running slowly we might lower the resolution scale of the SSAO or boom effects or even disable them until the framerate reaches an acceptable threshold. And inversely if we have some extra frame time we'll enable or improve effect quality until we see frame dips.

Here's something like I'm imagining:

bloomEffect = new BloomEffect();
composer.addPass(new RenderPass(scene, camera));
composer.addPass(new EffectPass(camera, bloomEffect));

// ...

bloomEffect.resolutionScale = 0.5;

Thanks again for the awesome work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions