--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAC7g9xQi11qY%3DEFkmYLEffGd_AObL3adEhUSftFX6EVMugViTA%40mail.gmail.com.
Yes, WebGPU will do early Z rejection by default. This is disabled if the fragment shader alters the frag_depth builtin.Relatedly, you can also do depth-only rendering that skips fragment processing entirely by omitting the `fragment` options while creating a render pipeline. At that point the vertex shaders will run and the resulting depth will output to the depth buffer but no color values will be computed, giving you an efficient way to populate the depth buffer early, which then takes advantage of that early Z rejection in later passes.--Brandon
On Mon, Sep 16, 2024 at 12:13 PM 'Philip Taylor' via WebGL Dev List <webgl-d...@googlegroups.com> wrote:
Hi, I'm writing a shader that assumes fragments will be discarded before the fragment shader is invoked, if they fail the early fragment test.It is based on the following algorithm:The technique is using the fragment shader to populate a visibility buffer. Only fragments passing the early depth test would be evaluated and they would update a visibility buffer.The algorithm is very simple, but in my case, it looks like _all_ fragments are going through the fragment shader stage and, and potentially being discarded after. I'm not sure when the depth test is being performed.I would assume that 'early-z discard' would eliminate these fragments, and I think that the algorithm relies on this feature to work.I can't see any configuration of early-z rejection in WebGPU, so I would assume it's on by default.Am I making an incorrect assumption here?--Philip TAYLORCTO, Zea Inc.Montréal, QuébecThe contents of this e-mail are confidential with all rights reserved to the author. It is illegal to use or divulge this information without authorization. If you have received this e-mail by mistake, please notify me immediately by replying to the e-mail.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAC7g9xQi11qY%3DEFkmYLEffGd_AObL3adEhUSftFX6EVMugViTA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAEGwwi3DKneq6p87h8_%3DvDJn6tBRqaBanQCtv5OiJVo_aPt92Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAC7g9xS_UFfSfEmRrX-QtKf1aSSH5K-V2WX%3DTkHHznzqS3R36w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAC7g9xS_UFfSfEmRrX-QtKf1aSSH5K-V2WX%3DTkHHznzqS3R36w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAEGwwi2r%2BKZ3zp-HghRqEbLUDPcuEKjGg8AR4K95XHJBdZVA2w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAC7g9xRVd7kuVwDk4gQ9nK8ZxzfJmKVpJuGZMXxHP3_7301guQ%40mail.gmail.com.