We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

alpha blend mode / add shader compatbility

Home Forums Graphics / Blender alpha blend mode / add shader compatbility

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43442
    thomasup
    Customer

    since we are trying to avoid alpha sorting issues, we are looking to use additive alpha blending, which should work oder-independent.

    now, in eevee you can achieve this by setting the material to alpha blend, and using an add shader (see attached image). unfortunately, this does not export to verge3d in the same way. the material will not blend additively.

    as a workaround, we are trying to output the color directly, and setting the blend mode via script manually:
    app.scene.getChildByName("BezierCircle.004").material.blending=v3d.AdditiveBlending;
    while this works, it is not completely the same blend effect, and it also will not look correct in the blender viewport.

    future support of the add shader with transparency would be much appreciated. alpha or multiply blend modes are very useful, as they do not depend on the draw order.

    Attachments:
    You must be logged in to view attached files.
    #61253

    Verge3D now supports this feature.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #61378
    visualizer
    Customer

    Hi
    Alex

    Can the latest version (OIT) support the blending transparency & opacity from 0 – 100 & 100 – 0 as well?

    #61379

    Hi visualizer,

    For now, it works, but usually the more opacity the objects have (except opaque objects), the worse the blending result will be. Therefore, the recommended opacity range is 0.0 to 0.5 (i.e 0-50).

    I still recommend to check, maybe in your case there will be an acceptable result.

    Verge3D Developer

    #64643
    thomasup
    Customer

    very nice! we will put the additive blending to use!

    • This reply was modified 1 year, 4 months ago by thomasup.
    #64681
    kdv
    Participant

    For now, it works, but usually the more opacity the objects have (except opaque objects), the worse the blending result will be. Therefore, the recommended opacity range is 0.0 to 0.5 (i.e 0-50).

    It’s quite possible to make it work in the full opacity range from 0 to 1. Even more, this won’t require additional WebGLOITRenderer, will work with any v3d.js version and will run a little bit faster on low-end/middle-end devices.

    4.3.1, original OIT https://v3d.net/l35
    4.2.0, custom OIT, sorting disabled https://v3d.net/inj

    since we are trying to avoid alpha sorting issues

    What issue exactly do you mean? There a lot of them with alpha blending. Show an example…

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.