Coder Social home page Coder Social logo

Comments (7)

drcmda avatar drcmda commented on June 18, 2024

i dont have an example for bloom but could you check it against selective outlines? the principles should be the same
https://codesandbox.io/s/selective-outlines-d36mw

from react-postprocessing.

chasedavis avatar chasedavis commented on June 18, 2024

Was having a similar problem, ended up changing Outline out for SelectiveBloom from your example @drcmda. It sort of works but there is a little weirdness as not all sides of the cubes are bloomed. Maybe is due to lights changing reflections based on cube rotation? https://codesandbox.io/s/selective-bloom-yqrm3

from react-postprocessing.

choxi avatar choxi commented on June 18, 2024

Here's a similar issue where only one surface of a cube gets the Bloom effect, and it flickers in and out as you rotate the camera: https://codesandbox.io/s/selective-bloom-perspective-bug-r9twh?file=/src/index.js

from react-postprocessing.

Russo-creation avatar Russo-creation commented on June 18, 2024

In one of my projects I noticed that <EffectComposer> component really like to be rerender otherwise it doesn't apply any changes on the effects components (like changing blending or other props through useFrame hook). Probably it is a bug.

@danielx-art Here https://codesandbox.io/s/selective-bloom-bug-forked-gg75q?file=/src/index.js I prepared mentioned workaround- add refs to the state array which cause rerender whole component after clicking specific cube.

from react-postprocessing.

jessefischer avatar jessefischer commented on June 18, 2024

@danielx-art I believe the problem is in this line:

selection={objectBloomRef}

If you change that to selection={[objectBloomRef]} (with the square brackets), does it fix it on your end? This is what I get:

Screen.Recording.2022-01-17.at.5.53.25.PM.mov

from react-postprocessing.

talentlessguy avatar talentlessguy commented on June 18, 2024

In one of my projects I noticed that <EffectComposer> component really like to be rerender otherwise it doesn't apply any changes on the effects components (like changing blending or other props through useFrame hook). Probably it is a bug.

@danielx-art Here https://codesandbox.io/s/selective-bloom-bug-forked-gg75q?file=/src/index.js I prepared mentioned workaround- add refs to the state array which cause rerender whole component after clicking specific cube.

This example is working on latest:

https://codesandbox.io/s/selective-bloom-bug-forked-j3o353?file=/src/index.js

from react-postprocessing.

danielx-art avatar danielx-art commented on June 18, 2024

This post went way beyond what I thought It would go. Thanks for the work around, It is a shame theres not a good solution for this, rerendering the whole thing every time is unusable if you have a hundred or so components as I initally wanted, and It also flickers for a moment every time.

from react-postprocessing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.