Skip to content

v3.9.0

Compare
Choose a tag to compare
@gre gre released this 18 Jul 11:23
· 333 commits to master since this release

LinearCopy & NearestCopy minor enhancements

  • fixes #135 : the props gets propagated to the underlying Node
  • there is a method on the instance, getNodeRef, that allows to get the reference of that underlying Node

Introduces Uniform.backbufferFrom(node)

fixes #136 : a new Uniform.backbufferFrom() function that accepted a Bus or a Node instance in parameter tells the Node to use the backbuffered texture rendered by the pointed Node's. the pointed Node needs to have set "backbuffering".

This allows a more advanced usecase for backbuffering: the ability to backbuffer and accumulate a rendering with some effects piped into many passes.

basic gist:

<Node
  backbuffering
  ref="mainNode"
  uniforms={{
    t: <SomeEffectStack>{
            initializingWithImage
            ? image 
            : Uniform.backbufferFrom(this.refs.mainNode)
       }</SomeEffectStack>
  }}
/>

Example

For instance, we can feed an image to a blur effect and then feedback-loop the output back into the blur effect again & again & again:

https://gl-react-cookbook.surge.sh/blurfeedback

u