top | item 44115392

(no title)

tarnith | 9 months ago

Also see https://michaldrobot.com/2014/04/01/gcn-execution-patterns-i...

A bit of an older article but still very relevant.

I've found with webGL2 you can also skip the whole upload/binding of the buffer and just emit the vertexes/coordinates from the vertex shader as well.

Less of an impact than cutting it down, but if you're just trying to get a a fragment going, why not use the least amount of data and CPU-> GPU upload possible.

discuss

order

cmovq|9 months ago

Yeah it’s nice even just to avoid having to set up a vertex buffer:

    ivec2 vert = ivec2(gl_VertexID & 1, gl_VertexID >> 1);

    out_uv = 2.0 * vec2(vert);
    gl_Position = vec4(out_uv * 2.0 - 1.0, 0.0, 1.0);