Skip to content

(question) how to composite multiple children using blendFunc #127

Open
@transitive-bullshit

Description

@transitive-bullshit

question

library version

3.6.0

npm ls gl-react gl-react-dom gl-react-native gl-react-expo
[email protected] 
└── [email protected]

This should be a relatively simple question, but I'm not seeing an easy way to composite multiple nodes together while being able to take advantage of the parent node's blendFunc.

The only way I can currently see of implementing this is to re-implement the blendFunc in the parent node's shader and have the multiple children passed in as textures, but this seems really backwards, so I'm guessing I'm missing something. None of the examples really use blendFunc or composite multiple children together.

Here's a jsfiddle with a DOM example of what I'm trying to accomplish.

Also, I absolutely love using gl-react -- keep up the great work!! :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions