Skip to content
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

alphaMode Additive question. #1033

Closed
memmottse opened this issue Jul 6, 2017 · 9 comments
Closed

alphaMode Additive question. #1033

memmottse opened this issue Jul 6, 2017 · 9 comments

Comments

@memmottse
Copy link

Is there a specific reason that an Additive option was not added to the alphaMode types?
I've searched through the issues and I haven't been able to find a discussion about it.

Thanks

@pjcozzi
Copy link
Member

pjcozzi commented Jul 10, 2017

@mlimper or @sbtron do you recall?

@mlimper
Copy link
Contributor

mlimper commented Jul 10, 2017

@bghgary probably has a more complete picture than me, but if I recall correctly:

With that said, additive blending might be yet another thing to discuss when considering further development of the spec.

@memmottse Could you give an example of your use case for additive blending? It would be interesting to know how relevant this is to the large majority, so we can get an idea if it makes sense to integrate this into future versions, or not.

@memmottse
Copy link
Author

@mlimper A specific use case I am looking at currently is a simple animated particle system fire. I can imagine several use cases though: fake light beams at a theater marque, holographic elements on a star ship bridge, etc.
From an implementation perspective it is a trivial matter of which blend parameters are set on the shader.

@lexaknyazev
Copy link
Member

While these are perfectly valid use cases, they don't seem to fit PBR Metal-Roughness model (which is glTF 2.0 default material). At some point, even alpha-over was considered to be excluded from spec.

I'd think that something like "effects" material extension should be created for cases like fire or beams.

@lexaknyazev
Copy link
Member

Given that schema is designed to be forward-compatible, such extension could enable new enum value for alphaMode like this:

{
    "materials": [
        {
            "name": "spark",
            "emissiveFactor": [ 1.0, 0.9, 0.8 ],
            "alphaMode": "ADD",
            "extensions": {
                "EXT_material_effects": {
                    "type": "SPARK",
                    "someParameter": 0.5
                }
            }
        }
    ]
}

@memmottse
Copy link
Author

Okay. That makes perfect sense.
Thanks.

@bghgary
Copy link
Contributor

bghgary commented Jul 11, 2017

Sorry for the slow response (just got back from vacation). We didn't include add or multiply for alphaMode because it's typically for particle effects which are not currently in the core spec. Without effects, having the ADD mode would seem out of place.

@andybak
Copy link

andybak commented Apr 22, 2023

We didn't include add or multiply for alphaMode because it's typically for particle effects which are not currently in the core spec.

@bghgary Additive transparency has uses far beyond particle effects and it's continuing absence is a real pain point for a lot of real world applications.

@bghgary
Copy link
Contributor

bghgary commented Apr 24, 2023

Additive transparency has uses far beyond particle effects and it's continuing absence is a real pain point for a lot of real world applications.

We would need an extension to support this. There was an effort earlier to do something like this: #1302. Discussions were on going, but we decided to focus on other priorities at the time. It might be good to voice your concerns there and maybe we can bring it back up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants