CesiumGS / webglreport

A web page that reports a browser's WebGL capabilities, including supported extensions and implementation specific capabilities, such as the maximum number of texture units.
https://webglreport.com
Apache License 2.0
400 stars 100 forks source link

Displayed max draw buffer count #20

Closed TiborsHub closed 9 years ago

TiborsHub commented 10 years ago

The value of MAX_DRAW_BUFFERS_WEBGL is dependent on the implementation. Added the value to the displayed name of the extension WEBGL_draw_buffers.

emackey commented 10 years ago

Hi @TiborsHub, this looks like a great addition. We need to get permission to use your code here, can you sign our CLA (Contributor's Licence Agreement) and email it to us? This is the same one we use for contributing to Cesium, and it preserves your own copyright on code you've written, but explicitly grants us a licence to redistribute that code with webglreport. Thanks!

emackey commented 10 years ago

@pjcozzi @bagnell Where in our webglreport flow chart does "Number of Draw Buffers" belong, if anywhere? Could it be added to the purple "Framebuffer" block at the bottom, and would that block need to be renamed "Framebuffer(s)"?

TiborsHub commented 10 years ago

It is used in the fragment shader to emit multiple outputs gl_FragData[0]

2014-10-02 16:39 GMT+02:00 Ed Mackey notifications@github.com:

@pjcozzi https://github.com/pjcozzi @bagnell https://github.com/bagnell Where in our webglreport flow chart does "Number of Draw Buffers" belong, if anywhere? Could it be added to the purple "Framebuffer" block at the bottom, and would that block need to be renamed "Framebuffer(s)"?

— Reply to this email directly or view it on GitHub https://github.com/AnalyticalGraphicsInc/webglreport/pull/20#issuecomment-57639324 .

TiborsHub commented 10 years ago

CLA is send.

2014-10-02 21:29 GMT+02:00 Tibor Ouden, den tibordenouden@gmail.com:

It is used in the fragment shader to emit multiple outputs gl_FragData[0]

  • gl_FragData[N] instead of gl_FragColor where N is implementation dependent.

2014-10-02 16:39 GMT+02:00 Ed Mackey notifications@github.com:

@pjcozzi https://github.com/pjcozzi @bagnell https://github.com/bagnell Where in our webglreport flow chart does "Number of Draw Buffers" belong, if anywhere? Could it be added to the purple "Framebuffer" block at the bottom, and would that block need to be renamed "Framebuffer(s)"?

— Reply to this email directly or view it on GitHub https://github.com/AnalyticalGraphicsInc/webglreport/pull/20#issuecomment-57639324 .

pjcozzi commented 10 years ago

@TiborsHub thanks for the contributions. Very cool!

As for Number of Draw Buffers, I'm OK with either place. It affects the fragment shader, but also, and perhaps more importantly, the GL calls.

emackey commented 10 years ago

@TiborsHub do you want to take a crack at adding the number of draw buffers to the flowchart part of the output?

TiborsHub commented 10 years ago

No problem, will be somewhere in the weekend though. To the fragment shader part ?

2014-10-02 21:42 GMT+02:00 Ed Mackey notifications@github.com:

@TiborsHub https://github.com/TiborsHub do you want to take a crack at adding the number of draw buffers to the flowchart part of the output?

— Reply to this email directly or view it on GitHub https://github.com/AnalyticalGraphicsInc/webglreport/pull/20#issuecomment-57693793 .

emackey commented 10 years ago

@TiborsHub We got the CLA, thanks! I don't have a strong preference for which block to add it to. It affects the code in the fragment shader, but really it's the number of available framebuffers, right? Is there a distinction between a "frame buffer" and a "draw buffer"? Seems like it almost belongs on the arrow connecting the fragment shader to the buffer(s), but it would look too messy there I think. So, the bottom of the fragment shader block, or the top of the frame buffer block would be fine.

When the extension is not present, you can report "1" buffer.

TiborsHub commented 10 years ago

A framebuffer can also contain depth and stencil buffers. What you see on screen is called a color buffer . In the reference the word draw buffer is mentioned only once and there it refers to every renderable image (depth, stencil or color buffer). Actually a better name of the extension should have been WEBGL_color_buffers I think.

So yes it is part of the frame buffer, lets put it there. And lets call it color buffer count (the word color buffer is found 40 times in the reference)

2014-10-02 21:55 GMT+02:00 Ed Mackey notifications@github.com:

@TiborsHub https://github.com/TiborsHub We got the CLA, thanks! I don't have a strong preference for which block to add it to. It affects the code in the fragment shader, but really it's the number of available framebuffers, right? Is there a distinction between a "frame buffer" and a "draw buffer"? Seems like it almost belongs on the arrow connecting the fragment shader to the buffer(s), but it would look too messy there I think. So, the bottom of the fragment shader block, or the top of the frame buffer block would be fine.

When the extension is not present, you can report "1" buffer.

— Reply to this email directly or view it on GitHub https://github.com/AnalyticalGraphicsInc/webglreport/pull/20#issuecomment-57695366 .

emackey commented 10 years ago

Sounds good :+1: thanks!

TiborsHub commented 10 years ago

Updated code to place the max color buffer count in the framebuffer section

emackey commented 9 years ago

Thanks @TiborsHub! This is deployed now.