Threejs' Material class has the blending property which is really useful for faking materials that emit light or other effects. (For example, see the disco lights in saturday night)
https://threejs.org/docs/#api/materials/Material.blending
It would be nice to have it available in A-Frame material directly, without having to make a custom component just for changing its value.
I would like to have a crack at this. As far as I can see it just means creating a blending component that passes the property to three.js in the sme way that e.g. the position component works. Does that make sense? Thanks
Hi @samrae7, please feel free! My feeling is that it should probably be a sub-property of the material component, like:
<a-entity material="src: foo.png; blending: additive" />
where values are none, normal, additive, subtractive, multiply. I think it is OK to leave out three.js's "custom" blending modes for now.
@feiss does that sound reasonable for most use cases?
@donmccurdy yup, that is exactly what I was asking for :)
@donmccurdy @feiss thanks. I'm working on this. Seems straightforward so will be done soon.
thanks!
Most helpful comment
https://github.com/aframevr/aframe/pull/3543