)]}'
{
  "commit": "d008bc82afb8988618a2533410f360d86a99c3d5",
  "tree": "c9a6257f6c4bdfbd01cefcc47e60fbb658d96207",
  "parents": [
    "2380b11f87358990d6226015aab46d91aff4ffe4"
  ],
  "author": {
    "name": "csmartdalton",
    "email": "hello@rive.app",
    "time": "Fri Jul 21 18:04:24 2023 +0000"
  },
  "committer": {
    "name": "csmartdalton",
    "email": "hello@rive.app",
    "time": "Fri Jul 21 18:04:24 2023 +0000"
  },
  "message": "Use back-face culling to give PLS triangles negative coverage\n\nPreviously, we would check at every pixel whether its triangle was clockwise, and use this information to decide if coverage should be positive or negative.\n\nThis PR updates to PLS to enable back-face culling emit every triangle twice: once clockwise and once counterclockwise; once with positive coverage and once with negative. And it emits this geometry in such a way that back-face culling naturally selects the triangle with the appropriately signed coverage (discarding the other).\n\nFor strokes, we take care to ensure the triangles are always clockwise and only emit the triangles once. This has a nice side effect of discarding some backwards triangles that we didn\u0027t need anyway when the stroke folded over onto itself.\n\nThis change gets some nice speedups by eliminating another branch in the fragment shader, dropping some unnecessary stroke triangles, and by no longer requiring the GPU to surface winding information to the shader.\n\nIt also paves the way for some really neat fill rule optimizations by always drawing negative coverage FIRST, and then drawing the positive coverage after.\n\nPerf improvements:\n\n187 martys on M1: 114 - 122 fps\n27 martys on Intel: 27.4 - 31.7 fps\npaper on Intel: 60.6 - 86.8 fps\n3 tigers on Intel: 54.9 - 69.5 fps\n\nDiffs\u003d\nf6d19cc24 Use back-face culling to give PLS triangles negative coverage (#5637)\n\nCo-authored-by: Chris Dalton \u003c99840794+csmartdalton@users.noreply.github.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee132d10acf6140473a73ea1a346fd8095a10d09",
      "old_mode": 33188,
      "old_path": ".rive_head",
      "new_id": "344c9b13522bbdd335c12ef60d09dc04192fa07e",
      "new_mode": 33188,
      "new_path": ".rive_head"
    },
    {
      "type": "modify",
      "old_id": "b659666569c46d12558aaed3c50d0ed18010c29f",
      "old_mode": 33188,
      "old_path": "include/rive/pls/pls.hpp",
      "new_id": "30c6ee158e468e46494388e2a253fc52e3434d4f",
      "new_mode": 33188,
      "new_path": "include/rive/pls/pls.hpp"
    },
    {
      "type": "modify",
      "old_id": "183d47efb4fad7118b6e9bc398759cab8a836601",
      "old_mode": 33188,
      "old_path": "include/rive/pls/pls_render_context.hpp",
      "new_id": "f13c98aedf864e8b86e24d8a41c08554bd5d7b00",
      "new_mode": 33188,
      "new_path": "include/rive/pls/pls_render_context.hpp"
    },
    {
      "type": "modify",
      "old_id": "2d5a770fa8759c0dc9b33322a8ff29c0872b8751",
      "old_mode": 33188,
      "old_path": "renderer/d3d/pls_render_context_d3d.cpp",
      "new_id": "1c9f526b1afa27a34790e4391a592a38ad66ddae",
      "new_mode": 33188,
      "new_path": "renderer/d3d/pls_render_context_d3d.cpp"
    },
    {
      "type": "modify",
      "old_id": "b69ded77616b2e325586f4de954debc637c81906",
      "old_mode": 33188,
      "old_path": "renderer/gl/pls_render_context_gl.cpp",
      "new_id": "4619613b478dbf6bdd009899f94dffb7945fdf3f",
      "new_mode": 33188,
      "new_path": "renderer/gl/pls_render_context_gl.cpp"
    },
    {
      "type": "modify",
      "old_id": "4f2260595c9b74cde9c05915512dabceeb375869",
      "old_mode": 33188,
      "old_path": "renderer/gr_inner_fan_triangulator.hpp",
      "new_id": "32b90fbaa1d89161df27ecd39facab816950c604",
      "new_mode": 33188,
      "new_path": "renderer/gr_inner_fan_triangulator.hpp"
    },
    {
      "type": "modify",
      "old_id": "576a38bc53b688f465c52f868aa6148523d0b9ec",
      "old_mode": 33188,
      "old_path": "renderer/gr_triangulator.cpp",
      "new_id": "e1ef9e95583e0de45821597205a2fcd4ed3ca82d",
      "new_mode": 33188,
      "new_path": "renderer/gr_triangulator.cpp"
    },
    {
      "type": "modify",
      "old_id": "b38e7b7674decec4231699c4aafb12917f71a77c",
      "old_mode": 33188,
      "old_path": "renderer/gr_triangulator.hpp",
      "new_id": "45a4ea3a410815851a7ec6f572c416bb27ecf5c9",
      "new_mode": 33188,
      "new_path": "renderer/gr_triangulator.hpp"
    },
    {
      "type": "modify",
      "old_id": "aee8c2a493bb26c1a9c5dbd14fc64f5c4c51f5f1",
      "old_mode": 33188,
      "old_path": "renderer/metal/pls_render_context_metal.mm",
      "new_id": "97a407e1bcbef9655af5c385ad00c5b6ac088771",
      "new_mode": 33188,
      "new_path": "renderer/metal/pls_render_context_metal.mm"
    },
    {
      "type": "modify",
      "old_id": "27cd3de71682d3e3147af105576ae6e1f64fac41",
      "old_mode": 33188,
      "old_path": "renderer/pls.cpp",
      "new_id": "9cf365d836b2da71f23a60205cfc92036076ae87",
      "new_mode": 33188,
      "new_path": "renderer/pls.cpp"
    },
    {
      "type": "modify",
      "old_id": "1b0afe0a911366072c09e2c1c14d0646c9f80133",
      "old_mode": 33188,
      "old_path": "renderer/pls_render_context.cpp",
      "new_id": "566c600e51c879587c00ecda1a0d2ca28483d86a",
      "new_mode": 33188,
      "new_path": "renderer/pls_render_context.cpp"
    },
    {
      "type": "modify",
      "old_id": "e53314db78c2f8c70e9037929714ac019619f343",
      "old_mode": 33188,
      "old_path": "renderer/pls_renderer.cpp",
      "new_id": "d45abe2ce6715ff2a3a9c30bb13db10912079266",
      "new_mode": 33188,
      "new_path": "renderer/pls_renderer.cpp"
    },
    {
      "type": "modify",
      "old_id": "d099f4d04c5c30a52ab5fe7becf6c07ce43efe14",
      "old_mode": 33188,
      "old_path": "renderer/shaders/color_ramp.glsl",
      "new_id": "d8415d23775d20567f9ef5a517e2dcb0fc2c4231",
      "new_mode": 33188,
      "new_path": "renderer/shaders/color_ramp.glsl"
    },
    {
      "type": "modify",
      "old_id": "1c9d0f9fba1572d109d6d97177c4d713505a18dc",
      "old_mode": 33188,
      "old_path": "renderer/shaders/common.glsl",
      "new_id": "bf1c4e85eb6df24f1af751f0cf4b4af9f01aaedc",
      "new_mode": 33188,
      "new_path": "renderer/shaders/common.glsl"
    },
    {
      "type": "modify",
      "old_id": "90c9a6a97a2826835d881753a2ff252c365465b9",
      "old_mode": 33188,
      "old_path": "renderer/shaders/draw.glsl",
      "new_id": "3b35db52b2ea674b69b11a3fee5800fb3bc7c8a2",
      "new_mode": 33188,
      "new_path": "renderer/shaders/draw.glsl"
    },
    {
      "type": "modify",
      "old_id": "394513128f1329f190d473b6ae61af2eb1d59a13",
      "old_mode": 33188,
      "old_path": "renderer/shaders/glsl.glsl",
      "new_id": "109fb55f41f9d3da5f81b88142ad6d24e1300c89",
      "new_mode": 33188,
      "new_path": "renderer/shaders/glsl.glsl"
    },
    {
      "type": "modify",
      "old_id": "afe51c4178eadad4eb4c47383e5e76f1d39e4418",
      "old_mode": 33188,
      "old_path": "renderer/shaders/hlsl.glsl",
      "new_id": "f31e58cfd244833a274d798724da3af0de7a3031",
      "new_mode": 33188,
      "new_path": "renderer/shaders/hlsl.glsl"
    },
    {
      "type": "modify",
      "old_id": "022cbabe10ea2530e6c952f4ed2733bd3a187118",
      "old_mode": 33188,
      "old_path": "renderer/shaders/metal.glsl",
      "new_id": "14f8b9060add44374ab75a61539bea4c38366e50",
      "new_mode": 33188,
      "new_path": "renderer/shaders/metal.glsl"
    },
    {
      "type": "modify",
      "old_id": "4c09129e62de08b6d035f811948c8860cfc4840e",
      "old_mode": 33188,
      "old_path": "renderer/shaders/minify.py",
      "new_id": "5445c5b401fe0bc82f613bf62be0f7fb45ac40c7",
      "new_mode": 33188,
      "new_path": "renderer/shaders/minify.py"
    },
    {
      "type": "modify",
      "old_id": "66c39c70e42294af7fd35909eedb5fb753a614ae",
      "old_mode": 33188,
      "old_path": "renderer/shaders/tessellate.glsl",
      "new_id": "2e89ae797c49029d61ec957ab6569cced8f53b9c",
      "new_mode": 33188,
      "new_path": "renderer/shaders/tessellate.glsl"
    }
  ]
}
