diff --git a/data/vulkan_shaders/reflection.json b/data/vulkan_shaders/reflection.json index d79b682ca4..ceaad77bb2 100644 --- a/data/vulkan_shaders/reflection.json +++ b/data/vulkan_shaders/reflection.json @@ -1 +1 @@ -[{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":39,"fs_off":4268,"fs_size":2552,"vs_off":0,"vs_size":4268},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":5,"fs_off":11140,"fs_size":2072,"vs_off":6820,"vs_size":4320},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":10,"fs_off":16444,"fs_size":1336,"vs_off":13212,"vs_size":3232},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":3,"fs_off":21876,"fs_size":2456,"vs_off":17780,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":12,"fs_off":27824,"fs_size":1892,"vs_off":24332,"vs_size":3492},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":13,"fs_off":32312,"fs_size":1336,"vs_off":29716,"vs_size":2596},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":2,"fs_off":37100,"fs_size":1732,"vs_off":33648,"vs_size":3452},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":15,"fs_off":42408,"fs_size":2092,"vs_off":38832,"vs_size":3576},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":24,"fs_off":50224,"fs_size":1868,"vs_off":44500,"vs_size":5724},{"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":35,"fs_off":53012,"fs_size":1168,"vs_off":52092,"vs_size":920},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":50,"fs_off":57564,"fs_size":1604,"vs_off":54180,"vs_size":3384},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":28,"fs_off":64916,"fs_size":3464,"vs_off":59168,"vs_size":5748},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":40,"fs_off":72436,"fs_size":1496,"vs_off":68380,"vs_size":4056},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":30,"fs_off":78508,"fs_size":3228,"vs_off":73932,"vs_size":4576},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":18,"fs_off":85616,"fs_size":1496,"vs_off":81736,"vs_size":3880},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_blendingWeightTex","idx":2}]},"prg":54,"fs_off":88484,"fs_size":3584,"vs_off":87112,"vs_size":1372},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":37,"fs_off":93716,"fs_size":1488,"vs_off":92068,"vs_size":1648},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":21,"fs_off":97268,"fs_size":1404,"vs_off":95204,"vs_size":2064},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":4,"fs_off":102768,"fs_size":2456,"vs_off":98672,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":23,"fs_off":109272,"fs_size":1528,"vs_off":105224,"vs_size":4048},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":7,"fs_off":114448,"fs_size":1748,"vs_off":110800,"vs_size":3648},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_smaaArea","idx":2},{"frag":1,"name":"u_smaaSearch","idx":3}]},"prg":53,"fs_off":118496,"fs_size":12056,"vs_off":116196,"vs_size":2300},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":49,"fs_off":136844,"fs_size":3472,"vs_off":130552,"vs_size":6292},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":31,"fs_off":143832,"fs_size":2344,"vs_off":140316,"vs_size":3516},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":46,"fs_off":151092,"fs_size":2072,"vs_off":146176,"vs_size":4916},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":16,"fs_off":158524,"fs_size":1800,"vs_off":153164,"vs_size":5360},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":44,"fs_off":164964,"fs_size":2456,"vs_off":160324,"vs_size":4640},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":14,"fs_off":172664,"fs_size":1944,"vs_off":167420,"vs_size":5244},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":22,"fs_off":178336,"fs_size":1528,"vs_off":174608,"vs_size":3728},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":41,"fs_off":184068,"fs_size":1732,"vs_off":179864,"vs_size":4204},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":32,"fs_off":189896,"fs_size":2456,"vs_off":185800,"vs_size":4096},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":48,"fs_off":196752,"fs_size":1748,"vs_off":192352,"vs_size":4400},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":42,"fs_off":203140,"fs_size":2456,"vs_off":198500,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":51,"fs_off":211504,"fs_size":2416,"vs_off":205596,"vs_size":5908},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":47,"fs_off":218320,"fs_size":2072,"vs_off":213920,"vs_size":4400},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":45,"fs_off":225032,"fs_size":2456,"vs_off":220392,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":43,"fs_off":232128,"fs_size":2456,"vs_off":227488,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":27,"fs_off":240332,"fs_size":3512,"vs_off":234584,"vs_size":5748},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":0,"fs_off":247496,"fs_size":2552,"vs_off":243844,"vs_size":3652},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":1,"fs_off":253352,"fs_size":1496,"vs_off":250048,"vs_size":3304},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":38,"fs_off":256496,"fs_size":1552,"vs_off":254848,"vs_size":1648},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":9,"fs_off":261140,"fs_size":1980,"vs_off":258048,"vs_size":3092},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":20,"fs_off":264940,"fs_size":1404,"vs_off":263120,"vs_size":1820},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":26,"fs_off":270692,"fs_size":1984,"vs_off":266344,"vs_size":4348},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":29,"fs_off":277724,"fs_size":2216,"vs_off":272676,"vs_size":5048},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":11,"fs_off":283172,"fs_size":1336,"vs_off":279940,"vs_size":3232},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":6,"fs_off":288156,"fs_size":2072,"vs_off":284508,"vs_size":3648},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":25,"fs_off":295112,"fs_size":832,"vs_off":290228,"vs_size":4884},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":19,"fs_off":299340,"fs_size":1704,"vs_off":295944,"vs_size":3396},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":36,"fs_off":302988,"fs_size":1824,"vs_off":301044,"vs_size":1944},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":52,"fs_off":306736,"fs_size":4000,"vs_off":304812,"vs_size":1924},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":8,"fs_off":313828,"fs_size":1980,"vs_off":310736,"vs_size":3092},{"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":34,"fs_off":316912,"fs_size":992,"vs_off":315808,"vs_size":1104},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":33,"fs_off":322000,"fs_size":2456,"vs_off":317904,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":17,"fs_off":330080,"fs_size":2372,"vs_off":324456,"vs_size":5624}] \ No newline at end of file +[{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":39,"fs_off":4268,"fs_size":2552,"vs_off":0,"vs_size":4268},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":5,"fs_off":11140,"fs_size":2072,"vs_off":6820,"vs_size":4320},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":10,"fs_off":16444,"fs_size":1336,"vs_off":13212,"vs_size":3232},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":3,"fs_off":21876,"fs_size":2456,"vs_off":17780,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":12,"fs_off":27824,"fs_size":1892,"vs_off":24332,"vs_size":3492},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":13,"fs_off":32312,"fs_size":1336,"vs_off":29716,"vs_size":2596},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":2,"fs_off":37100,"fs_size":1732,"vs_off":33648,"vs_size":3452},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":15,"fs_off":42408,"fs_size":2092,"vs_off":38832,"vs_size":3576},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":24,"fs_off":50224,"fs_size":1868,"vs_off":44500,"vs_size":5724},{"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":35,"fs_off":53012,"fs_size":1168,"vs_off":52092,"vs_size":920},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":50,"fs_off":57564,"fs_size":1604,"vs_off":54180,"vs_size":3384},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":28,"fs_off":65020,"fs_size":4240,"vs_off":59168,"vs_size":5852},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":40,"fs_off":73316,"fs_size":1496,"vs_off":69260,"vs_size":4056},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":30,"fs_off":79492,"fs_size":3332,"vs_off":74812,"vs_size":4680},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":18,"fs_off":86704,"fs_size":1496,"vs_off":82824,"vs_size":3880},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_blendingWeightTex","idx":2}]},"prg":54,"fs_off":89572,"fs_size":3584,"vs_off":88200,"vs_size":1372},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":37,"fs_off":94804,"fs_size":1488,"vs_off":93156,"vs_size":1648},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":21,"fs_off":98356,"fs_size":1404,"vs_off":96292,"vs_size":2064},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":4,"fs_off":103856,"fs_size":2456,"vs_off":99760,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":23,"fs_off":110360,"fs_size":1528,"vs_off":106312,"vs_size":4048},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":7,"fs_off":115536,"fs_size":1748,"vs_off":111888,"vs_size":3648},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_smaaArea","idx":2},{"frag":1,"name":"u_smaaSearch","idx":3}]},"prg":53,"fs_off":119584,"fs_size":12056,"vs_off":117284,"vs_size":2300},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":49,"fs_off":137932,"fs_size":3472,"vs_off":131640,"vs_size":6292},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":31,"fs_off":144920,"fs_size":2344,"vs_off":141404,"vs_size":3516},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":46,"fs_off":152180,"fs_size":2072,"vs_off":147264,"vs_size":4916},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":16,"fs_off":159612,"fs_size":1800,"vs_off":154252,"vs_size":5360},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":44,"fs_off":166052,"fs_size":2456,"vs_off":161412,"vs_size":4640},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":14,"fs_off":173752,"fs_size":1944,"vs_off":168508,"vs_size":5244},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":22,"fs_off":179424,"fs_size":1528,"vs_off":175696,"vs_size":3728},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":41,"fs_off":185156,"fs_size":1732,"vs_off":180952,"vs_size":4204},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":32,"fs_off":190984,"fs_size":2456,"vs_off":186888,"vs_size":4096},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":48,"fs_off":197840,"fs_size":1748,"vs_off":193440,"vs_size":4400},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":42,"fs_off":204228,"fs_size":2456,"vs_off":199588,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":51,"fs_off":212592,"fs_size":2416,"vs_off":206684,"vs_size":5908},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":47,"fs_off":219408,"fs_size":2072,"vs_off":215008,"vs_size":4400},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":45,"fs_off":226120,"fs_size":2456,"vs_off":221480,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":43,"fs_off":233216,"fs_size":2456,"vs_off":228576,"vs_size":4640},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":27,"fs_off":241524,"fs_size":4644,"vs_off":235672,"vs_size":5852},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":0,"fs_off":249820,"fs_size":2552,"vs_off":246168,"vs_size":3652},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":1,"fs_off":255676,"fs_size":1496,"vs_off":252372,"vs_size":3304},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":38,"fs_off":258820,"fs_size":1552,"vs_off":257172,"vs_size":1648},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":9,"fs_off":263464,"fs_size":1980,"vs_off":260372,"vs_size":3092},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":20,"fs_off":267264,"fs_size":1404,"vs_off":265444,"vs_size":1820},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":26,"fs_off":273016,"fs_size":1984,"vs_off":268668,"vs_size":4348},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":29,"fs_off":280152,"fs_size":2320,"vs_off":275000,"vs_size":5152},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1}],"fs_uni":0},"prg":11,"fs_off":285704,"fs_size":1336,"vs_off":282472,"vs_size":3232},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":6,"fs_off":290688,"fs_size":2072,"vs_off":287040,"vs_size":3648},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":25,"fs_off":297644,"fs_size":832,"vs_off":292760,"vs_size":4884},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":19,"fs_off":301872,"fs_size":1704,"vs_off":298476,"vs_size":3396},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":36,"fs_off":305520,"fs_size":1824,"vs_off":303576,"vs_size":1944},{"info":{"vs_uni":0,"fs_uni":-1,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":52,"fs_off":309268,"fs_size":4000,"vs_off":307344,"vs_size":1924},{"info":{"vs_uni":0,"tex":[{"frag":0,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}],"fs_uni":0},"prg":8,"fs_off":316360,"fs_size":1980,"vs_off":313268,"vs_size":3092},{"info":{"vs_uni":-1,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":34,"fs_off":319444,"fs_size":992,"vs_off":318340,"vs_size":1104},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1}]},"prg":33,"fs_off":324532,"fs_size":2456,"vs_off":320436,"vs_size":4096},{"info":{"vs_uni":0,"fs_uni":0,"tex":[{"frag":1,"name":"u_colorTex","idx":1},{"frag":1,"name":"u_maskTex","idx":2}]},"prg":17,"fs_off":332612,"fs_size":2372,"vs_off":326988,"vs_size":5624}] \ No newline at end of file diff --git a/data/vulkan_shaders/shaders_pack.spv b/data/vulkan_shaders/shaders_pack.spv index 0aeacdde6e..3210a0c27c 100644 Binary files a/data/vulkan_shaders/shaders_pack.spv and b/data/vulkan_shaders/shaders_pack.spv differ diff --git a/drape_frontend/route_renderer.cpp b/drape_frontend/route_renderer.cpp index 5ce4ee29c8..18d231ae6b 100644 --- a/drape_frontend/route_renderer.cpp +++ b/drape_frontend/route_renderer.cpp @@ -30,6 +30,8 @@ std::string const kRouteMaskBicycle = "RouteMaskBicycle"; std::string const kRouteArrowsMaskBicycle = "RouteArrowsMaskBicycle"; std::string const kRouteMaskPedestrian = "RouteMaskPedestrian"; std::string const kTransitStopInnerMarkerColor = "TransitStopInnerMarker"; +std::string const kRouteFakeColor = "RouteFake"; +std::string const kRouteFakeOutlineColor = "RouteFakeOutline"; namespace { @@ -459,6 +461,10 @@ void RouteRenderer::RenderSubroute(ref_ptr context, ref_ptr { params.m_outlineColor = glsl::ToVec4(df::GetColorConstant(style.m_outlineColor)); } + params.m_fakeBorders = glsl::vec2(subrouteData->m_subroute->m_headFakeDistance, + subrouteData->m_subroute->m_tailFakeDistance); + params.m_fakeColor = glsl::ToVec4(df::GetColorConstant(kRouteFakeColor)); + params.m_fakeOutlineColor = glsl::ToVec4(df::GetColorConstant(kRouteFakeOutlineColor)); ref_ptr prg = mng->GetProgram(style.m_pattern.m_isDashed ? gpu::Program::RouteDash : gpu::Program::Route); diff --git a/drape_frontend/route_shape.hpp b/drape_frontend/route_shape.hpp index 29913ff57f..264a067a87 100644 --- a/drape_frontend/route_shape.hpp +++ b/drape_frontend/route_shape.hpp @@ -148,6 +148,9 @@ struct Subroute std::vector m_style; std::vector m_markers; + + double m_headFakeDistance = 0.0; + double m_tailFakeDistance = 0.0; }; using SubrouteConstPtr = std::shared_ptr; diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 240cd9103e..3abf3bb18c 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -250,6 +250,52 @@ drape_ptr CreateDrapeSubroute(vector const & segment return nullptr; } + // We support visualization of fake edges only in the head and in the tail of subroute. + auto constexpr kInvalidId = std::numeric_limits::max(); + auto firstReal = kInvalidId; + auto lastReal = kInvalidId; + for (size_t i = 0; i < segments.size(); ++i) + { + if (!segments[i].GetSegment().IsRealSegment()) + continue; + + if (firstReal == kInvalidId) + firstReal = i; + lastReal = i; + } + + if (firstReal == kInvalidId) + { + // All segments are fake. + subroute->m_headFakeDistance = 0.0; + subroute->m_tailFakeDistance = 0.0; + } + else + { + CHECK_NOT_EQUAL(firstReal, kInvalidId, ()); + CHECK_NOT_EQUAL(lastReal, kInvalidId, ()); + + auto constexpr kEps = 1e-5; + auto constexpr kBias = 1.0; + + // To prevent visual artefacts, in the case when all head segments are real + // m_headFakeDistance must be less than 0.0. + auto const headLen = (firstReal > 0) ? segments[firstReal - 1].GetDistFromBeginningMerc() - baseDistance : 0.0; + if (base::AlmostEqualAbs(headLen, 0.0, kEps)) + subroute->m_headFakeDistance = -kBias; + else + subroute->m_headFakeDistance = headLen; + + // To prevent visual artefacts, in the case when all tail segments are real + // m_tailFakeDistance must be greater than the length of the subroute. + auto const subrouteLen = segments.back().GetDistFromBeginningMerc() - baseDistance; + auto const tailLen = segments[lastReal].GetDistFromBeginningMerc() - baseDistance; + if (base::AlmostEqualAbs(tailLen, subrouteLen, kEps)) + subroute->m_tailFakeDistance = subrouteLen + kBias; + else + subroute->m_tailFakeDistance = tailLen; + } + subroute->m_polyline = m2::PolylineD(points); return subroute; } diff --git a/shaders/GL/route.fsh.glsl b/shaders/GL/route.fsh.glsl index 249940f2dc..3e811131f0 100644 --- a/shaders/GL/route.fsh.glsl +++ b/shaders/GL/route.fsh.glsl @@ -14,6 +14,10 @@ uniform vec4 u_outlineColor; uniform vec4 u_routeParams; uniform vec4 u_maskColor; +uniform vec2 u_fakeBorders; +uniform vec4 u_fakeColor; +uniform vec4 u_fakeOutlineColor; + const float kAntialiasingThreshold = 0.92; const float kOutlineThreshold1 = 0.81; @@ -24,9 +28,16 @@ void main() if (v_length.x < v_length.z) discard; - vec4 color = mix(mix(u_color, vec4(v_color.rgb, 1.0), v_color.a), u_color, step(u_routeParams.w, 0.0)); - color = mix(color, u_outlineColor, step(kOutlineThreshold1, abs(v_length.y))); - color = mix(color, u_outlineColor, smoothstep(kOutlineThreshold2, kOutlineThreshold1, abs(v_length.y))); + vec2 coefs = step(v_length.xx, u_fakeBorders); + coefs.y = 1.0 - coefs.y; + vec4 mainColor = mix(u_color, u_fakeColor, coefs.x); + mainColor = mix(mainColor, u_fakeColor, coefs.y); + vec4 mainOutlineColor = mix(u_outlineColor, u_fakeOutlineColor, coefs.x); + mainOutlineColor = mix(mainOutlineColor, u_fakeOutlineColor, coefs.y); + + vec4 color = mix(mix(mainColor, vec4(v_color.rgb, 1.0), v_color.a), mainColor, step(u_routeParams.w, 0.0)); + color = mix(color, mainOutlineColor, step(kOutlineThreshold1, abs(v_length.y))); + color = mix(color, mainOutlineColor, smoothstep(kOutlineThreshold2, kOutlineThreshold1, abs(v_length.y))); color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))); color = vec4(mix(color.rgb, u_maskColor.rgb, u_maskColor.a), color.a); gl_FragColor = samsungGoogleNexusWorkaround(color); diff --git a/shaders/GL/route_dash.fsh.glsl b/shaders/GL/route_dash.fsh.glsl index eed937cb60..484fd2ccc7 100644 --- a/shaders/GL/route_dash.fsh.glsl +++ b/shaders/GL/route_dash.fsh.glsl @@ -13,6 +13,9 @@ uniform vec4 u_color; uniform vec2 u_pattern; uniform vec4 u_maskColor; +uniform vec2 u_fakeBorders; +uniform vec4 u_fakeColor; + const float kAntialiasingThreshold = 0.92; float alphaFromPattern(float curLen, float dashLen, float gapLen) @@ -27,7 +30,12 @@ void main() if (v_length.x < v_length.z) discard; - vec4 color = u_color + v_color; + vec2 coefs = step(v_length.xx, u_fakeBorders); + coefs.y = 1.0 - coefs.y; + vec4 mainColor = mix(u_color, u_fakeColor, coefs.x); + mainColor = mix(mainColor, u_fakeColor, coefs.y); + + vec4 color = mainColor + v_color; color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))) * alphaFromPattern(v_length.x, u_pattern.x, u_pattern.y); color = vec4(mix(color.rgb, u_maskColor.rgb, u_maskColor.a), color.a); diff --git a/shaders/Metal/route.metal b/shaders/Metal/route.metal index e9957ecaae..39e0a0f412 100644 --- a/shaders/Metal/route.metal +++ b/shaders/Metal/route.metal @@ -16,6 +16,9 @@ typedef struct packed_float2 u_angleCosSin; float u_arrowHalfWidth; float u_opacity; + packed_float2 u_fakeBorders; + float4 u_fakeColor; + float4 u_fakeOutlineColor; } Uniforms_T; // Route/RouteDash @@ -69,10 +72,18 @@ fragment float4 fsRoute(const RouteFragment_T in [[stage_in]], constexpr float kOutlineThreshold1 = 0.81; constexpr float kOutlineThreshold2 = 0.71; - float4 color = mix(mix(uniforms.u_color, float4(in.color.rgb, 1.0), in.color.a), uniforms.u_color, + float2 fb = uniforms.u_fakeBorders; + float2 coefs = step(in.lengthParams.xx, fb); + coefs.y = 1.0 - coefs.y; + float4 mainColor = mix(uniforms.u_color, uniforms.u_fakeColor, coefs.x); + mainColor = mix(mainColor, uniforms.u_fakeColor, coefs.y); + float4 mainOutlineColor = mix(uniforms.u_outlineColor, uniforms.u_fakeOutlineColor, coefs.x); + mainOutlineColor = mix(mainOutlineColor, uniforms.u_fakeOutlineColor, coefs.y); + + float4 color = mix(mix(mainColor, float4(in.color.rgb, 1.0), in.color.a), mainColor, step(uniforms.u_routeParams.w, 0.0)); - color = mix(color, uniforms.u_outlineColor, step(kOutlineThreshold1, abs(in.lengthParams.y))); - color = mix(color, uniforms.u_outlineColor, + color = mix(color, mainOutlineColor, step(kOutlineThreshold1, abs(in.lengthParams.y))); + color = mix(color, mainOutlineColor, smoothstep(kOutlineThreshold2, kOutlineThreshold1, abs(in.lengthParams.y))); color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(in.lengthParams.y))); color = float4(mix(color.rgb, uniforms.u_maskColor.rgb, uniforms.u_maskColor.a), color.a); @@ -94,7 +105,13 @@ fragment float4 fsRouteDash(const RouteFragment_T in [[stage_in]], constexpr float kAntialiasingThreshold = 0.92; - float4 color = uniforms.u_color + in.color; + float2 fb = uniforms.u_fakeBorders; + float2 coefs = step(in.lengthParams.xx, fb); + coefs.y = 1.0 - coefs.y; + float4 mainColor = mix(uniforms.u_color, uniforms.u_fakeColor, coefs.x); + mainColor = mix(mainColor, uniforms.u_fakeColor, coefs.y); + + float4 color = mainColor + in.color; float a = 1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(in.lengthParams.y)); color.a *= (a * AlphaFromPattern(in.lengthParams.x, uniforms.u_pattern)); color = float4(mix(color.rgb, uniforms.u_maskColor.rgb, uniforms.u_maskColor.a), color.a); diff --git a/shaders/gl_program_params.cpp b/shaders/gl_program_params.cpp index 8e91a589cb..451c3cc1d8 100644 --- a/shaders/gl_program_params.cpp +++ b/shaders/gl_program_params.cpp @@ -116,6 +116,9 @@ void GLProgramParamsSetter::Apply(ref_ptr context, Parameter::CheckApply(guard, "u_angleCosSin", params.m_angleCosSin); Parameter::CheckApply(guard, "u_arrowHalfWidth", params.m_arrowHalfWidth); Parameter::CheckApply(guard, "u_opacity", params.m_opacity); + Parameter::CheckApply(guard, "u_fakeBorders", params.m_fakeBorders); + Parameter::CheckApply(guard, "u_fakeColor", params.m_fakeColor); + Parameter::CheckApply(guard, "u_fakeOutlineColor", params.m_fakeOutlineColor); } void GLProgramParamsSetter::Apply(ref_ptr context, diff --git a/shaders/program_params.hpp b/shaders/program_params.hpp index 004494bf6e..fe7c02ba80 100644 --- a/shaders/program_params.hpp +++ b/shaders/program_params.hpp @@ -105,6 +105,9 @@ struct RouteProgramParams glsl::vec2 m_angleCosSin; float m_arrowHalfWidth = 0.0f; float m_opacity = 1.0f; + glsl::vec2 m_fakeBorders; + glsl::vec4 m_fakeColor; + glsl::vec4 m_fakeOutlineColor; BIND_PROGRAMS(RouteProgramParams, Program::Route,