diff --git a/data/vulkan_shaders/reflection.json b/data/vulkan_shaders/reflection.json index bca74ae8eb..b428a2a4eb 100644 --- a/data/vulkan_shaders/reflection.json +++ b/data/vulkan_shaders/reflection.json @@ -1 +1 @@ -[{"prg":0,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":0,"vs_size":3772,"fs_off":3772,"fs_size":2552},{"prg":1,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":6324,"vs_size":3412,"fs_off":9736,"fs_size":1508},{"prg":2,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":11244,"vs_size":3560,"fs_off":14804,"fs_size":1756},{"prg":3,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":16560,"vs_size":4468,"fs_off":21028,"fs_size":2508},{"prg":4,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":23536,"vs_size":4468,"fs_off":28004,"fs_size":2508},{"prg":5,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":30512,"vs_size":4440,"fs_off":34952,"fs_size":2084},{"prg":6,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":37036,"vs_size":3768,"fs_off":40804,"fs_size":2084},{"prg":7,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":42888,"vs_size":3104,"fs_off":45992,"fs_size":1992},{"prg":8,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":47984,"vs_size":3104,"fs_off":51088,"fs_size":1992},{"prg":9,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":53080,"vs_size":3352,"fs_off":56432,"fs_size":1336},{"prg":10,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":57768,"vs_size":3352,"fs_off":61120,"fs_size":1336},{"prg":11,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":62456,"vs_size":3692,"fs_off":66148,"fs_size":1904},{"prg":12,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":68052,"vs_size":2716,"fs_off":70768,"fs_size":1336},{"prg":13,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":72104,"vs_size":5084,"fs_off":77188,"fs_size":1332},{"prg":14,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":78520,"vs_size":5436,"fs_off":83956,"fs_size":1800},{"prg":15,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":85756,"vs_size":5452,"fs_off":91208,"fs_size":1828},{"prg":16,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":93036,"vs_size":3988,"fs_off":97024,"fs_size":1508},{"prg":17,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":98532,"vs_size":3352,"fs_off":101884,"fs_size":1336},{"prg":18,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":103220,"vs_size":3696,"fs_off":106916,"fs_size":2092},{"prg":19,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":109008,"vs_size":3516,"fs_off":112524,"fs_size":1716},{"prg":20,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":114240,"vs_size":1820,"fs_off":116060,"fs_size":1416},{"prg":21,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":117476,"vs_size":2064,"fs_off":119540,"fs_size":1416},{"prg":22,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":120956,"vs_size":3640,"fs_off":124596,"fs_size":1540},{"prg":23,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":126136,"vs_size":4140,"fs_off":130276,"fs_size":1540},{"prg":24,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":131816,"vs_size":5812,"fs_off":137628,"fs_size":1868},{"prg":25,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":139496,"vs_size":4976,"fs_off":144472,"fs_size":832},{"prg":26,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":145304,"vs_size":4440,"fs_off":149744,"fs_size":1984},{"prg":27,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":151728,"vs_size":5928,"fs_off":157656,"fs_size":4644},{"prg":28,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":162300,"vs_size":5928,"fs_off":168228,"fs_size":4240},{"prg":29,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":172468,"vs_size":5228,"fs_off":177696,"fs_size":2332},{"prg":30,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":180028,"vs_size":4772,"fs_off":184800,"fs_size":3332},{"prg":31,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":188132,"vs_size":3624,"fs_off":191756,"fs_size":2344},{"prg":32,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":194100,"vs_size":4468,"fs_off":198568,"fs_size":2508},{"prg":33,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":201076,"vs_size":4468,"fs_off":205544,"fs_size":2508},{"prg":34,"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":208052,"vs_size":1104,"fs_off":209156,"fs_size":992},{"prg":35,"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":210148,"vs_size":920,"fs_off":211068,"fs_size":1180},{"prg":36,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":212248,"vs_size":2044,"fs_off":214292,"fs_size":1904},{"prg":37,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":216196,"vs_size":2416,"fs_off":218612,"fs_size":1856},{"prg":38,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":220468,"vs_size":1880,"fs_off":222348,"fs_size":1628},{"prg":39,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":223976,"vs_size":1880,"fs_off":225856,"fs_size":1692},{"prg":40,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":227548,"vs_size":4280,"fs_off":231828,"fs_size":2552},{"prg":41,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":234380,"vs_size":4056,"fs_off":238436,"fs_size":1508},{"prg":42,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":239944,"vs_size":4204,"fs_off":244148,"fs_size":1756},{"prg":43,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":245904,"vs_size":4904,"fs_off":250808,"fs_size":2508},{"prg":44,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":253316,"vs_size":4904,"fs_off":258220,"fs_size":2508},{"prg":45,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":260728,"vs_size":4904,"fs_off":265632,"fs_size":2508},{"prg":46,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":268140,"vs_size":4904,"fs_off":273044,"fs_size":2508},{"prg":47,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":275552,"vs_size":4928,"fs_off":280480,"fs_size":2084},{"prg":48,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":282564,"vs_size":4412,"fs_off":286976,"fs_size":2084},{"prg":49,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":289060,"vs_size":6368,"fs_off":295428,"fs_size":3820},{"prg":50,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":299248,"vs_size":3492,"fs_off":302740,"fs_size":1616},{"prg":51,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":304356,"vs_size":5984,"fs_off":310340,"fs_size":2428},{"prg":52,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":312768,"vs_size":1924,"fs_off":314692,"fs_size":4236},{"prg":53,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_smaaArea","idx":2,"frag":1},{"name":"u_smaaSearch","idx":3,"frag":1}]},"vs_off":318928,"vs_size":2300,"fs_off":321228,"fs_size":12356},{"prg":54,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_blendingWeightTex","idx":2,"frag":1}]},"vs_off":333584,"vs_size":1372,"fs_off":334956,"fs_size":3696}] \ No newline at end of file +[{"prg":0,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":0,"vs_size":3772,"fs_off":3772,"fs_size":2552},{"prg":1,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":6324,"vs_size":3412,"fs_off":9736,"fs_size":1508},{"prg":2,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":11244,"vs_size":3560,"fs_off":14804,"fs_size":1756},{"prg":3,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":16560,"vs_size":4468,"fs_off":21028,"fs_size":2508},{"prg":4,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":23536,"vs_size":4468,"fs_off":28004,"fs_size":2508},{"prg":5,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":30512,"vs_size":4440,"fs_off":34952,"fs_size":2084},{"prg":6,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":37036,"vs_size":3768,"fs_off":40804,"fs_size":2084},{"prg":7,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":42888,"vs_size":3104,"fs_off":45992,"fs_size":1992},{"prg":8,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":47984,"vs_size":3104,"fs_off":51088,"fs_size":1992},{"prg":9,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":53080,"vs_size":3352,"fs_off":56432,"fs_size":1336},{"prg":10,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":57768,"vs_size":3352,"fs_off":61120,"fs_size":1336},{"prg":11,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":62456,"vs_size":3692,"fs_off":66148,"fs_size":1904},{"prg":12,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":68052,"vs_size":2716,"fs_off":70768,"fs_size":1336},{"prg":13,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":72104,"vs_size":5084,"fs_off":77188,"fs_size":1332},{"prg":14,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":78520,"vs_size":5436,"fs_off":83956,"fs_size":1800},{"prg":15,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":85756,"vs_size":5452,"fs_off":91208,"fs_size":1828},{"prg":16,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":93036,"vs_size":3988,"fs_off":97024,"fs_size":1508},{"prg":17,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":98532,"vs_size":3352,"fs_off":101884,"fs_size":1336},{"prg":18,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":103220,"vs_size":3696,"fs_off":106916,"fs_size":2092},{"prg":19,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":109008,"vs_size":3516,"fs_off":112524,"fs_size":1716},{"prg":20,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":114240,"vs_size":1820,"fs_off":116060,"fs_size":1416},{"prg":21,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":117476,"vs_size":2064,"fs_off":119540,"fs_size":1416},{"prg":22,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":120956,"vs_size":3640,"fs_off":124596,"fs_size":1540},{"prg":23,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":126136,"vs_size":4140,"fs_off":130276,"fs_size":1540},{"prg":24,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":131816,"vs_size":5812,"fs_off":137628,"fs_size":1868},{"prg":25,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":139496,"vs_size":4976,"fs_off":144472,"fs_size":832},{"prg":26,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":145304,"vs_size":4440,"fs_off":149744,"fs_size":1984},{"prg":27,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":151728,"vs_size":5928,"fs_off":157656,"fs_size":4644},{"prg":28,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":162300,"vs_size":5928,"fs_off":168228,"fs_size":4240},{"prg":29,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":172468,"vs_size":5228,"fs_off":177696,"fs_size":2332},{"prg":30,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":180028,"vs_size":4772,"fs_off":184800,"fs_size":3332},{"prg":31,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":188132,"vs_size":3624,"fs_off":191756,"fs_size":2344},{"prg":32,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":194100,"vs_size":4468,"fs_off":198568,"fs_size":2508},{"prg":33,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":201076,"vs_size":4468,"fs_off":205544,"fs_size":2508},{"prg":34,"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":208052,"vs_size":1104,"fs_off":209156,"fs_size":992},{"prg":35,"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":210148,"vs_size":920,"fs_off":211068,"fs_size":1180},{"prg":36,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":212248,"vs_size":2044,"fs_off":214292,"fs_size":1904},{"prg":37,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":216196,"vs_size":2416,"fs_off":218612,"fs_size":1856},{"prg":38,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":220468,"vs_size":1880,"fs_off":222348,"fs_size":1628},{"prg":39,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":223976,"vs_size":1880,"fs_off":225856,"fs_size":1692},{"prg":40,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0}],"fs_uni":0},"vs_off":227548,"vs_size":4280,"fs_off":231828,"fs_size":2552},{"prg":41,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":234380,"vs_size":4056,"fs_off":238436,"fs_size":1508},{"prg":42,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":239944,"vs_size":4204,"fs_off":244148,"fs_size":1756},{"prg":43,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":245904,"vs_size":4904,"fs_off":250808,"fs_size":2508},{"prg":44,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":253316,"vs_size":4904,"fs_off":258220,"fs_size":2508},{"prg":45,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":260728,"vs_size":4904,"fs_off":265632,"fs_size":2508},{"prg":46,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":268140,"vs_size":4904,"fs_off":273044,"fs_size":2508},{"prg":47,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":275552,"vs_size":4928,"fs_off":280480,"fs_size":2084},{"prg":48,"info":{"vs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":0},{"name":"u_maskTex","idx":2,"frag":1}],"fs_uni":0},"vs_off":282564,"vs_size":4412,"fs_off":286976,"fs_size":2084},{"prg":49,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_maskTex","idx":2,"frag":1}]},"vs_off":289060,"vs_size":6368,"fs_off":295428,"fs_size":3820},{"prg":50,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":299248,"vs_size":3492,"fs_off":302740,"fs_size":1616},{"prg":51,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":304356,"vs_size":5984,"fs_off":310340,"fs_size":2428},{"prg":52,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":312768,"vs_size":1924,"fs_off":314692,"fs_size":4236},{"prg":53,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_smaaArea","idx":2,"frag":1},{"name":"u_smaaSearch","idx":3,"frag":1}]},"vs_off":318928,"vs_size":2300,"fs_off":321228,"fs_size":12356},{"prg":54,"info":{"vs_uni":0,"fs_uni":0,"tex":[{"name":"u_colorTex","idx":1,"frag":1},{"name":"u_blendingWeightTex","idx":2,"frag":1}]},"vs_off":333584,"vs_size":1372,"fs_off":334956,"fs_size":3696},{"prg":55,"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"name":"u_colorTex","idx":1,"frag":1}]},"vs_off":338652,"vs_size":1700,"fs_off":340352,"fs_size":892}] \ No newline at end of file diff --git a/data/vulkan_shaders/shaders_pack.spv b/data/vulkan_shaders/shaders_pack.spv index 2e8dcdff7c..ac7f25de5b 100644 Binary files a/data/vulkan_shaders/shaders_pack.spv and b/data/vulkan_shaders/shaders_pack.spv differ diff --git a/shaders/GL/imgui.fsh.glsl b/shaders/GL/imgui.fsh.glsl new file mode 100644 index 0000000000..4c4fcb13ff --- /dev/null +++ b/shaders/GL/imgui.fsh.glsl @@ -0,0 +1,10 @@ +varying vec2 v_texCoords; +varying vec4 v_color; + +uniform sampler2D u_colorTex; + +void main() +{ + LOW_P vec4 color = texture2D(u_colorTex, v_texCoords); + gl_FragColor = color * v_color; +} diff --git a/shaders/GL/imgui.vsh.glsl b/shaders/GL/imgui.vsh.glsl new file mode 100644 index 0000000000..977894c4ff --- /dev/null +++ b/shaders/GL/imgui.vsh.glsl @@ -0,0 +1,19 @@ +attribute vec2 a_position; +attribute vec2 a_texCoords; +attribute vec4 a_color; + +varying vec2 v_texCoords; +varying vec4 v_color; + +uniform mat4 u_projection; + +void main() +{ + v_texCoords = a_texCoords; + v_color = a_color; + gl_Position = vec4(a_position, 0, 1) * u_projection; +#ifdef VULKAN + gl_Position.y = -gl_Position.y; + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; +#endif +} diff --git a/shaders/GL/shader_index.txt b/shaders/GL/shader_index.txt index 6103d27589..9decc59502 100644 --- a/shaders/GL/shader_index.txt +++ b/shaders/GL/shader_index.txt @@ -53,3 +53,4 @@ TrafficCircle traffic_circle.vsh.glsl traffic_circle.fsh.glsl SmaaEdges smaa_edges.vsh.glsl smaa_edges.fsh.glsl SmaaBlendingWeight smaa_blending_weight.vsh.glsl smaa_blending_weight.fsh.glsl SmaaFinal smaa_final.vsh.glsl smaa_final.fsh.glsl +ImGui imgui.vsh.glsl imgui.fsh.glsl diff --git a/shaders/Metal/imgui.metal b/shaders/Metal/imgui.metal new file mode 100644 index 0000000000..932fb5ca9a --- /dev/null +++ b/shaders/Metal/imgui.metal @@ -0,0 +1,39 @@ +#include +#include +using namespace metal; + +typedef struct +{ + float2 a_position [[attribute(0)]]; + float2 a_texCoords [[attribute(1)]]; + float4 a_color [[attribute(2)]]; +} Vertex_T; + +typedef struct +{ + float4 position [[position]]; + float2 texCoords; + float4 color; +} Fragment_T; + +typedef struct +{ + float4x4 u_projection; +} Uniforms_T; + +vertex Fragment_T vsImGui(const Vertex_T in [[stage_in]], + constant Uniforms_T & uniforms [[buffer(1)]]) +{ + Fragment_T out; + out.position = float4(in.a_position, 0.0, 1.0) * uniforms.u_projection; + out.texCoords = in.a_texCoords; + out.color = in.a_color; + return out; +} + +fragment float4 fsImGui(const Fragment_T in [[stage_in]], + texture2d u_colorTex [[texture(0)]], + sampler u_colorTexSampler [[sampler(0)]]) +{ + return in.color * u_colorTex.sample(u_colorTexSampler, in.texCoords); +} diff --git a/shaders/gl_program_params.cpp b/shaders/gl_program_params.cpp index 59f13ea7dc..cf372db3e6 100644 --- a/shaders/gl_program_params.cpp +++ b/shaders/gl_program_params.cpp @@ -230,4 +230,14 @@ void GLProgramParamsSetter::Apply(ref_ptr context, Parameter::CheckApply(guard, "u_framebufferMetrics", params.m_framebufferMetrics); } + +void GLProgramParamsSetter::Apply(ref_ptr context, + ref_ptr program, + ImGuiProgramParams const & params) +{ + UNUSED_VALUE(context); + UniformsGuard guard(program, params); + + Parameter::CheckApply(guard, "u_projection", params.m_projection); +} } // namespace gpu diff --git a/shaders/gl_program_params.hpp b/shaders/gl_program_params.hpp index 2ce8fe028d..20626abdc7 100644 --- a/shaders/gl_program_params.hpp +++ b/shaders/gl_program_params.hpp @@ -29,5 +29,7 @@ public: ref_ptr program, ScreenQuadProgramParams const & params) override; void Apply(ref_ptr context, ref_ptr program, SMAAProgramParams const & params) override; + void Apply(ref_ptr context, + ref_ptr program, ImGuiProgramParams const & params) override; }; } // namespace gpu diff --git a/shaders/metal_program_params.hpp b/shaders/metal_program_params.hpp index 4134e770b0..fa0cc09752 100644 --- a/shaders/metal_program_params.hpp +++ b/shaders/metal_program_params.hpp @@ -31,6 +31,8 @@ public: ScreenQuadProgramParams const & params) override; void Apply(ref_ptr context, ref_ptr program, SMAAProgramParams const & params) override; + void Apply(ref_ptr context, ref_ptr program, + ImGuiProgramParams const & params) override; }; } // namespace metal } // namespace gpu diff --git a/shaders/metal_program_params.mm b/shaders/metal_program_params.mm index d5da8217d7..d63396d258 100644 --- a/shaders/metal_program_params.mm +++ b/shaders/metal_program_params.mm @@ -101,5 +101,12 @@ void MetalProgramParamsSetter::Apply(ref_ptr context, { ApplyBytes(context, program, params); } + +void MetalProgramParamsSetter::Apply(ref_ptr context, + ref_ptr program, + ImGuiProgramParams const & params) +{ + ApplyBytes(context, program, params); +} } // namespace metal } // namespace gpu diff --git a/shaders/metal_program_pool.mm b/shaders/metal_program_pool.mm index 11dca8c56f..9926082ba4 100644 --- a/shaders/metal_program_pool.mm +++ b/shaders/metal_program_pool.mm @@ -102,6 +102,7 @@ std::array(Program::ProgramsCount)> const kMeta ProgramInfo("vsSmaaEdges", "fsSmaaEdges", {{0, 1}}), // SmaaEdges ProgramInfo("vsSmaaBlendingWeight", "fsSmaaBlendingWeight", {{0, 1}}), // SmaaBlendingWeight ProgramInfo("vsSmaaFinal", "fsSmaaFinal", {{0, 1}}), // SmaaFinal + ProgramInfo("vsImGui", "fsImGui", {{0, 2}}), // ImGui }}; MTLVertexFormat GetFormatByDataType(MTLDataType dataType) diff --git a/shaders/program_params.cpp b/shaders/program_params.cpp index e9119948f3..a774b2eec3 100644 --- a/shaders/program_params.cpp +++ b/shaders/program_params.cpp @@ -18,6 +18,7 @@ void ProgramParams::Init() DebugRectProgramParams::BindPrograms(m_boundParams); ScreenQuadProgramParams::BindPrograms(m_boundParams); SMAAProgramParams::BindPrograms(m_boundParams); + ImGuiProgramParams::BindPrograms(m_boundParams); } // static diff --git a/shaders/program_params.hpp b/shaders/program_params.hpp index c2bea7925a..fa17305b74 100644 --- a/shaders/program_params.hpp +++ b/shaders/program_params.hpp @@ -222,6 +222,14 @@ struct ALIGNMENT SMAAProgramParams Program::SmaaFinal) }; +struct ALIGNMENT ImGuiProgramParams +{ + glsl::mat4 m_projection; + + BIND_PROGRAMS(ImGuiProgramParams, + Program::ImGui) +}; + #undef ALIGNMENT class ProgramParamsSetter @@ -248,5 +256,7 @@ public: ref_ptr program, ScreenQuadProgramParams const & params) = 0; virtual void Apply(ref_ptr context, ref_ptr program, SMAAProgramParams const & params) = 0; + virtual void Apply(ref_ptr context, + ref_ptr program, ImGuiProgramParams const & params) = 0; }; } // namespace gpu diff --git a/shaders/programs.hpp b/shaders/programs.hpp index ca74e7a067..2804d29a06 100644 --- a/shaders/programs.hpp +++ b/shaders/programs.hpp @@ -65,6 +65,7 @@ enum class Program SmaaEdges, SmaaBlendingWeight, SmaaFinal, + ImGui, ProgramsCount }; @@ -128,6 +129,7 @@ inline std::string DebugPrint(Program p) case Program::SmaaEdges: return "SmaaEdges"; case Program::SmaaBlendingWeight: return "SmaaBlendingWeight"; case Program::SmaaFinal: return "SmaaFinal"; + case Program::ImGui: return "ImGui"; case Program::ProgramsCount: CHECK(false, ("Try to output ProgramsCount")); diff --git a/shaders/vulkan_program_params.cpp b/shaders/vulkan_program_params.cpp index a764e3a9e5..58dd83ffac 100644 --- a/shaders/vulkan_program_params.cpp +++ b/shaders/vulkan_program_params.cpp @@ -229,5 +229,12 @@ void VulkanProgramParamsSetter::Apply(ref_ptr context, { ApplyImpl(context, program, params); } + +void VulkanProgramParamsSetter::Apply(ref_ptr context, + ref_ptr program, + ImGuiProgramParams const & params) +{ + ApplyImpl(context, program, params); +} } // namespace vulkan } // namespace gpu diff --git a/shaders/vulkan_program_params.hpp b/shaders/vulkan_program_params.hpp index 91ab62f50b..25a2dcf8f9 100644 --- a/shaders/vulkan_program_params.hpp +++ b/shaders/vulkan_program_params.hpp @@ -55,6 +55,8 @@ public: ScreenQuadProgramParams const & params) override; void Apply(ref_ptr context, ref_ptr program, SMAAProgramParams const & params) override; + void Apply(ref_ptr context, ref_ptr program, + ImGuiProgramParams const & params) override; private: template