{"id":324348,"date":"2021-06-04T15:00:18","date_gmt":"2021-06-04T15:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=324348"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=324348","title":{"rendered":"Vulkan. \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041f\u0440\u043e\u0445\u043e\u0434\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0430 (Render passes)"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 IT-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 CG Tribe \u0432 \u0418\u0436\u0435\u0432\u0441\u043a\u0435 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c Vulkan Tutorial \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u2014 <a href=\"https:\/\/vulkan-tutorial.com\" rel=\"nofollow noopener noreferrer\">vulkan-tutorial.com<\/a>).<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443 (Graphics pipeline basics), \u2014 <a href=\"https:\/\/vulkan-tutorial.com\/Drawing_a_triangle\/Graphics_pipeline_basics\/Render_passes\" rel=\"nofollow noopener noreferrer\">Render passes<\/a> \u0438 <a href=\"https:\/\/vulkan-tutorial.com\/Drawing_a_triangle\/Graphics_pipeline_basics\/Conclusion\" rel=\"nofollow noopener noreferrer\">Conclusion<\/a>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">1. <a href=\"http:\/\/habr.com\/ru\/post\/462137\/\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/p>\n<p>  2. <a href=\"http:\/\/habr.com\/ru\/post\/524992\/\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440<\/a><\/p>\n<p>  3. <a href=\"https:\/\/habr.com\/ru\/post\/526320\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p>  4. <a href=\"https:\/\/habr.com\/ru\/post\/531196\/\">\u0420\u0438\u0441\u0443\u0435\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a<\/a><\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/a><br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/#base\">\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/#two\">\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 (instance)<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/535342\/\">\u0421\u043b\u043e\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/537208\/#phys\">\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/537208\/#logic\">\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435<br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/539174\/\">Window surface<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/542942\/\">Swap chain<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/543288\/\">Image views<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/\">\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 (pipeline)<\/a> <br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/#shader\">\u0428\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/554492\/\">\u041d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u044d\u0442\u0430\u043f\u044b<\/a><\/li>\n<li>\u041f\u0440\u043e\u0445\u043e\u0434\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/li>\n<li>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/li>\n<\/ul>\n<\/li>\n<li>\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430<\/li>\n<li>\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u0430<\/li>\n<\/ol>\n<p>  5. \u0411\u0443\u0444\u0435\u0440\u044b \u0432\u0435\u0440\u0448\u0438\u043d<\/p>\n<ol>\n<li>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d<\/li>\n<li>Staging \u0431\u0443\u0444\u0435\u0440<\/li>\n<li>\u0411\u0443\u0444\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/li>\n<\/ol>\n<p>  6. Uniform-\u0431\u0443\u0444\u0435\u0440\u044b<\/p>\n<ol>\n<li>\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 layout \u0438 \u0431\u0443\u0444\u0435\u0440\u0430<\/li>\n<li>\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043f\u0443\u043b\u0430 \u0438 sets<\/li>\n<\/ol>\n<p>  7. \u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<ol>\n<li>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>Image view \u0438 image sampler<\/li>\n<li>\u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 image sampler<\/li>\n<\/ol>\n<p>  8. \u0411\u0443\u0444\u0435\u0440 \u0433\u043b\u0443\u0431\u0438\u043d\u044b<\/p>\n<p>  9. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/p>\n<p>  10. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u043f-\u043a\u0430\u0440\u0442<\/p>\n<p>  11. Multisampling<\/p>\n<p>  FAQ<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438  <\/div>\n<\/p><\/div>\n<h2>\u041f\u0440\u043e\u0445\u043e\u0434\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"#one\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/a><\/li>\n<li><a href=\"#two\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 (attachments)<\/a><\/li>\n<li><a href=\"#three\">\u041f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u044b (subpasses)<\/a><\/li>\n<li><a href=\"#four\">\u041f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 (render pass)<\/a><\/li>\n<\/ul>\n<p><a name=\"one\"><\/a><\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c Vulkan, \u043a\u0430\u043a\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u044b (attachments) \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0446\u0432\u0435\u0442\u0430, \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u0441\u044d\u043c\u043f\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430. \u0412\u0441\u044f \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u0430 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <i>\u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/i> (render pass), \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b><code>createRenderPass<\/code><\/b>. \u0412\u044b\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 <b><code>initVulkan<\/code><\/b> \u043f\u0435\u0440\u0435\u0434 <code><b>createGraphicsPipeline<\/b><\/code>.<\/p>\n<pre><code class=\"cpp\">void initVulkan() {     createInstance();     setupDebugMessenger();     createSurface();     pickPhysicalDevice();     createLogicalDevice();     createSwapChain();     createImageViews();     createRenderPass();     createGraphicsPipeline(); }  ...  void createRenderPass() {  }<\/code><\/pre>\n<p><a name=\"two\"><\/a><\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 (attachments)<\/h3>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0431\u0443\u0444\u0435\u0440, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 images \u0432 swap chain.<\/p>\n<pre><code class=\"cpp\">void createRenderPass() {     VkAttachmentDescription colorAttachment{};     colorAttachment.format = swapChainImageFormat;     colorAttachment.samples = VK_SAMPLE_COUNT_1_BIT; }<\/code><\/pre>\n<p>  \u0424\u043e\u0440\u043c\u0430\u0442 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 (\u043f\u043e\u043b\u0435 <b><code>format<\/code><\/b>) \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0443 image \u0438\u0437 swap chain, \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u043c\u0443\u043b\u044c\u0442\u0438\u0441\u044d\u043c\u043f\u043b\u0438\u043d\u0433, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0441\u044d\u043c\u043f\u043b.<\/p>\n<pre><code class=\"cpp\">colorAttachment.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; colorAttachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;<\/code><\/pre>\n<p>  <b><code>loadOp<\/code><\/b> \u0438 <b><code>storeOp<\/code><\/b> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0433\u043e. \u0414\u043b\u044f <b><code>loadOp<\/code><\/b> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li><b><code>VK_ATTACHMENT_LOAD_OP_LOAD<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u043d\u0435\u0433\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430)<\/li>\n<li><b><code>VK_ATTACHMENT_LOAD_OP_CLEAR<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/li>\n<li><b><code>VK_ATTACHMENT_LOAD_OP_DONT_CARE<\/code><\/b>: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e; \u0434\u043b\u044f \u043d\u0430\u0441 \u043e\u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>VK_ATTACHMENT_LOAD_OP_CLEAR<\/code><\/b>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0431\u0443\u0444\u0435\u0440 \u0447\u0435\u0440\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0430. <\/p>\n<p>  \u0414\u043b\u044f <b><code>storeOp<\/code><\/b> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li><b><code>VK_ATTACHMENT_STORE_OP_STORE<\/code><\/b>: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li><b><code>VK_ATTACHMENT_STORE_OP_DONT_CARE<\/code><\/b>: \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0431\u0443\u0444\u0435\u0440 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0438 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;<\/code><\/pre>\n<p>  <b><code>loadOp<\/code><\/b> \u0438 <b><code>storeOp<\/code><\/b> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u0431\u0443\u0444\u0435\u0440\u0430\u043c \u0446\u0432\u0435\u0442\u0430 \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b. \u0414\u043b\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u0442\u0440\u0430\u0444\u0430\u0440\u0435\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044f <b><code>stencilLoadOp<\/code><\/b>\/<b><code>stencilStoreOp<\/code><\/b>. \u041c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0443\u0444\u0435\u0440 \u0442\u0440\u0430\u0444\u0430\u0440\u0435\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442.<\/p>\n<pre><code class=\"cpp\">colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; colorAttachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;<\/code><\/pre>\n<p>  \u0422\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0438 \u0444\u0440\u0435\u0439\u043c\u0431\u0443\u0444\u0435\u0440\u044b \u0432 Vulkan \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkImage.html\" rel=\"nofollow noopener noreferrer\">VkImage<\/a><\/b> \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u043e\u0434\u043d\u0430\u043a\u043e layout \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 image.<\/p>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 layout-\u043e\u0432:<\/p>\n<ul>\n<li><b><code>VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL<\/code><\/b>: images \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430<\/li>\n<li><b><code>VK_IMAGE_LAYOUT_PRESENT_SRC_KHR<\/code><\/b>: images \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435<\/li>\n<li><b><code>VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL<\/code><\/b>: image \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0432 \u0433\u043b\u0430\u0432\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b images \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u0432 layouts, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>  \u0412 <b><code>initialLayout<\/code><\/b> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f layout, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 image \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u0412 <b><code>finalLayout<\/code><\/b> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f layout, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 image \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <b><code>VK_IMAGE_LAYOUT_UNDEFINED<\/code><\/b> \u0432 \u043f\u043e\u043b\u0435 <b><code>initialLayout<\/code><\/b> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 layout, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b image. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e image, \u043d\u043e \u044d\u0442\u043e \u0438 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u043c \u0435\u0433\u043e. \u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448 image \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u043e\u043b\u0435 <b><code>finalLayout<\/code><\/b> \u0443\u043a\u0430\u0436\u0435\u043c <b><code>VK_IMAGE_LAYOUT_PRESENT_SRC_KHR<\/code><\/b>.<a name=\"three\"><\/a><\/p>\n<h3>\u041f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u044b (subpasses)<\/h3>\n<p>  \u041e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432 (subpasses). \u041f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u044b \u2014 \u044d\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0445\u043e\u0434\u0430\u0445. \u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430, Vulkan \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0432\u0438\u0434\u0438\u043c\u043e, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u0442\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433). \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434.<\/p>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e attachment-\u043e\u0432. \u042d\u0442\u0438 \u043e\u0442\u0441\u044b\u043b\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkAttachmentReference.html\" rel=\"nofollow noopener noreferrer\">VkAttachmentReference<\/a><\/b>:<\/p>\n<pre><code class=\"cpp\">VkAttachmentReference colorAttachmentRef{}; colorAttachmentRef.attachment = 0; colorAttachmentRef.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;<\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u043b\u0435 <b><code>attachment<\/code><\/b> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434. \u041d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkAttachmentDescription.html\" rel=\"nofollow noopener noreferrer\">VkAttachmentDescription<\/a><\/b>, \u0435\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441 \u0440\u0430\u0432\u0435\u043d <b><code>0<\/code><\/b>. \u0412 \u043f\u043e\u043b\u0435 <b><code>layout<\/code><\/b> \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c layout \u0431\u0443\u0444\u0435\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u0430, \u0441\u0441\u044b\u043b\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0431\u0443\u0444\u0435\u0440. Vulkan \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u0442 \u0431\u0443\u0444\u0435\u0440 \u0432 \u044d\u0442\u043e\u0442 layout, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c attachment \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0446\u0432\u0435\u0442\u0430, \u0438 layout <b><code>VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL<\/code><\/b> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u043d\u0430\u043c \u0441\u0430\u043c\u0443\u044e \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkSubpassDescription.html\" rel=\"nofollow noopener noreferrer\">VkSubpassDescription<\/a><\/b>:<\/p>\n<pre><code class=\"cpp\">VkSubpassDescription subpass{}; subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;<\/code><\/pre>\n<p>  \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c Vulkan \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u044b. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0436\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0431\u0443\u0444\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">subpass.colorAttachmentCount = 1; subpass.pColorAttachments = &amp;colorAttachmentRef;<\/code><\/pre>\n<p>  \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <b><code>layout(location = 0) out vec4 outColor<\/code><\/b> \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <b><code>subpass.pColorAttachments<\/code><\/b>.<\/p>\n<p>  \u041f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u0431\u0443\u0444\u0435\u0440\u043e\u0432: <\/p>\n<ul>\n<li><b><code>pInputAttachments<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0448\u0435\u0439\u0434\u0435\u0440\u0430<\/li>\n<li><b><code>pResolveAttachments<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0441 \u043c\u0443\u043b\u044c\u0442\u0438\u0441\u044d\u043c\u043f\u043b\u0438\u043d\u0433\u043e\u043c<\/li>\n<li><b><code>pDepthStencilAttachment<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440\u044b \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u0442\u0440\u0430\u0444\u0430\u0440\u0435\u0442\u0430<\/li>\n<li><b><code>pPreserveAttachments<\/code><\/b>: \u0431\u0443\u0444\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u0435, \u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b<\/li>\n<\/ul>\n<p><a name=\"four\"><\/a><\/p>\n<h3>\u041f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 (render pass)<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0444\u0435\u0440 \u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434, \u0441\u0441\u044b\u043b\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0431\u0443\u0444\u0435\u0440, \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u043c \u043f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u041f\u0435\u0440\u0435\u0434 <b><code>pipelineLayout<\/code><\/b> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e-\u0447\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkRenderPass.html\" rel=\"nofollow noopener noreferrer\">VkRenderPass<\/a><\/b>:<\/p>\n<pre><code class=\"cpp\">VkRenderPass renderPass; VkPipelineLayout pipelineLayout;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkRenderPassCreateInfo.html\" rel=\"nofollow noopener noreferrer\">VkRenderPassCreateInfo<\/a><\/b> \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u0430\u043c\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043e\u0431\u044a\u0435\u043a\u0442\u044b <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkAttachmentReference.html\" rel=\"nofollow noopener noreferrer\">VkAttachmentReference<\/a><\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 (\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0432\u0438\u0434\u0438\u043c\u043e, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043c\u0430\u0441\u0441\u0438\u0432 <b><code>renderPassInfo.pAttachments<\/code><\/b>). <\/p>\n<pre><code class=\"cpp\">VkRenderPassCreateInfo renderPassInfo{}; renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; renderPassInfo.attachmentCount = 1; renderPassInfo.pAttachments = &amp;colorAttachment; renderPassInfo.subpassCount = 1; renderPassInfo.pSubpasses = &subpass;  if (vkCreateRenderPass(device, &amp;renderPassInfo, nullptr, &amp;renderPass) != VK_SUCCESS) {     throw std::runtime_error(&quot;failed to create render pass!&quot;); }<\/code><\/pre>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435:<\/p>\n<pre><code class=\"cpp\">void cleanup() {     vkDestroyPipelineLayout(device, pipelineLayout, nullptr);     vkDestroyRenderPass(device, renderPass, nullptr);     ... }<\/code><\/pre>\n<p>  \u041c\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443, \u0438 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0435\u0434\u0438\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440!<\/p>\n<p>  <b><a href=\"https:\/\/vulkan-tutorial.com\/code\/11_render_passes.cpp\" rel=\"nofollow noopener noreferrer\">C++ code<\/a><\/b> \/ <b><a href=\"https:\/\/vulkan-tutorial.com\/Drawing_a_triangle\/Graphics_pipeline_basics\/Render_passes\" rel=\"nofollow noopener noreferrer\">Vertex shader<\/a><\/b> \/ <b><a href=\"https:\/\/vulkan-tutorial.com\/code\/09_shader_base.frag\" rel=\"nofollow noopener noreferrer\">Fragment shader<\/a><\/b><\/p>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440! <br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c: <\/p>\n<ul>\n<li>\u0428\u0435\u0439\u0434\u0435\u0440\u044b: \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u0434\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/li>\n<li>\u041d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0442\u0430\u0434\u0438\u0438: \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u0434\u0438\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a input assembler, \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0442\u043e\u0440, \u0432\u044c\u044e\u043f\u043e\u0440\u0442 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432<\/li>\n<li>Layout \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 uniform-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 push-\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438<\/li>\n<li>\u041f\u0440\u043e\u0445\u043e\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 (render pass): \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u043e\u0432 (attachments), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u043d\u0434\u0435\u0440<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0421 \u043d\u0438\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkGraphicsPipelineCreateInfo.html\" rel=\"nofollow noopener noreferrer\">VkGraphicsPipelineCreateInfo<\/a><\/b>. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <b><code>createGraphicsPipeline<\/code><\/b>, \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/vkDestroyShaderModule.html\" rel=\"nofollow noopener noreferrer\">vkDestroyShaderModule<\/a><\/b>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430.<\/p>\n<pre><code class=\"cpp\">VkGraphicsPipelineCreateInfo pipelineInfo{}; pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; pipelineInfo.stageCount = 2; pipelineInfo.pStages = shaderStages;<\/code><\/pre>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkPipelineShaderStageCreateInfo.html\" rel=\"nofollow noopener noreferrer\">VkPipelineShaderStageCreateInfo<\/a><\/b>.<\/p>\n<pre><code class=\"cpp\">pipelineInfo.pVertexInputState = &amp;vertexInputInfo; pipelineInfo.pInputAssemblyState = &amp;inputAssembly; pipelineInfo.pViewportState = &amp;viewportState; pipelineInfo.pRasterizationState = &rasterizer; pipelineInfo.pMultisampleState = &multisampling; pipelineInfo.pDepthStencilState = nullptr; \/\/ Optional pipelineInfo.pColorBlendState = &amp;colorBlending; pipelineInfo.pDynamicState = nullptr; \/\/ Optional<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430.<\/p>\n<pre><code class=\"cpp\">pipelineInfo.layout = pipelineLayout;<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0436\u0435\u043c layout \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u043c Vulkan, \u0430 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<pre><code class=\"cpp\">pipelineInfo.renderPass = renderPass; pipelineInfo.subpass = 0;<\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434 (render pass) \u0438 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0434\u043f\u0440\u043e\u0445\u043e\u0434\u0430 (subpass), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0430, \u043d\u043e \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u043d\u0430\u0448\u0438\u043c <b><code>renderPass<\/code><\/b>. \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.0\/html\/vkspec.html#renderpass-compatibility\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a><\/b>, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434. <\/p>\n<pre><code class=\"cpp\">pipelineInfo.basePipelineHandle = VK_NULL_HANDLE; \/\/ Optional pipelineInfo.basePipelineIndex = -1; \/\/ Optional<\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2014 <b><code>basePipelineHandle<\/code><\/b> \u0438 <b><code>basePipelineIndex<\/code><\/b>. Vulkan \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0442\u0440\u0430\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430\u043c\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0412 \u043f\u043e\u043b\u0435 <b><code>basePipelineHandle<\/code><\/b> \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0441\u044b\u043b\u043a\u0443 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u0432 \u043f\u043e\u043b\u0435 <b><code>basePipelineIndex<\/code><\/b>. \u0423 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u043a\u0430\u0436\u0435\u043c <b><code>VK_NULL_HANDLE<\/code><\/b> \u0438 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440. \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkGraphicsPipelineCreateInfo.html\" rel=\"nofollow noopener noreferrer\">VkGraphicsPipelineCreateInfo<\/a><\/b> \u0432 \u043f\u043e\u043b\u0435 <b><code>flags<\/code><\/b> \u0443\u043a\u0430\u0437\u0430\u043d\u043e <b><code>VK_PIPELINE_CREATE_DERIVATIVE_BIT<\/code><\/b>.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0447\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkPipeline.html\" rel=\"nofollow noopener noreferrer\">VkPipeline<\/a><\/b>:<\/p>\n<pre><code class=\"cpp\">VkPipeline graphicsPipeline;<\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">if (vkCreateGraphicsPipelines(device, VK_NULL_HANDLE, 1, &amp;pipelineInfo, nullptr, &amp;graphicsPipeline) != VK_SUCCESS) {     throw std::runtime_error(&quot;failed to create graphics pipeline!&quot;); }<\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/vkCreateGraphicsPipelines.html\" rel=\"nofollow noopener noreferrer\">vkCreateGraphicsPipelines<\/a><\/b> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Vulkan. \u0417\u0430 \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkPipeline.html\" rel=\"nofollow noopener noreferrer\">VkPipeline<\/a><\/b> \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkGraphicsPipelineCreateInfo.html\" rel=\"nofollow noopener noreferrer\">VkGraphicsPipelineCreateInfo<\/a><\/b>.<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/VkPipelineCache.html\" rel=\"nofollow noopener noreferrer\">VkPipelineCache<\/a><\/b> \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c <b><code>VK_NULL_HANDLE<\/code><\/b>. \u041a\u044d\u0448 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u041e\u043d \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <b><a href=\"https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/man\/html\/vkCreateGraphicsPipelines.html\" rel=\"nofollow noopener noreferrer\">vkCreateGraphicsPipelines<\/a><\/b> \u0438 \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u043d\u0430 \u0434\u0438\u0441\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u041c\u044b \u0435\u0449\u0435 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0432 \u0433\u043b\u0430\u0432\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u043a\u044d\u0448\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430.<\/p>\n<p>  \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435:<\/p>\n<pre><code class=\"cpp\">void cleanup() {     vkDestroyPipeline(device, graphicsPipeline, nullptr);     vkDestroyPipelineLayout(device, pipelineLayout, nullptr);     ... }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e! \u0421\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0440\u0435\u0439\u043c\u0431\u0443\u0444\u0435\u0440\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 images \u0438\u0437 swap chain \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <a href=\"https:\/\/vulkan-tutorial.com\/code\/12_graphics_pipeline_complete.cpp\" rel=\"nofollow noopener noreferrer\"><b>C++ code<\/b><\/a> \/ <b><a href=\"https:\/\/vulkan-tutorial.com\/code\/09_shader_base.vert\" rel=\"nofollow noopener noreferrer\">Vertex shader<\/a><\/b> \/ <b><a href=\"https:\/\/vulkan-tutorial.com\/code\/09_shader_base.frag\" rel=\"nofollow noopener noreferrer\">Fragment shader<\/a><\/b><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/560816\/\"> https:\/\/habr.com\/ru\/post\/560816\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 IT-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 CG Tribe \u0432 \u0418\u0436\u0435\u0432\u0441\u043a\u0435 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c Vulkan Tutorial \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u2014 <a href=\"https:\/\/vulkan-tutorial.com\" rel=\"nofollow noopener noreferrer\">vulkan-tutorial.com<\/a>).<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443 (Graphics pipeline basics), \u2014 <a href=\"https:\/\/vulkan-tutorial.com\/Drawing_a_triangle\/Graphics_pipeline_basics\/Render_passes\" rel=\"nofollow noopener noreferrer\">Render passes<\/a> \u0438 <a href=\"https:\/\/vulkan-tutorial.com\/Drawing_a_triangle\/Graphics_pipeline_basics\/Conclusion\" rel=\"nofollow noopener noreferrer\">Conclusion<\/a>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">1. <a href=\"http:\/\/habr.com\/ru\/post\/462137\/\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/p>\n<p>  2. <a href=\"http:\/\/habr.com\/ru\/post\/524992\/\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440<\/a><\/p>\n<p>  3. <a href=\"https:\/\/habr.com\/ru\/post\/526320\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p>  4. <a href=\"https:\/\/habr.com\/ru\/post\/531196\/\">\u0420\u0438\u0441\u0443\u0435\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a<\/a><\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/a><br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/#base\">\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/531196\/#two\">\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 (instance)<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/535342\/\">\u0421\u043b\u043e\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/537208\/#phys\">\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/537208\/#logic\">\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435<br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/539174\/\">Window surface<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/542942\/\">Swap chain<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/543288\/\">Image views<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/\">\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 (pipeline)<\/a> <br \/> \n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/547576\/#shader\">\u0428\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/554492\/\">\u041d\u0435\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u044d\u0442\u0430\u043f\u044b<\/a><\/li>\n<li>\u041f\u0440\u043e\u0445\u043e\u0434\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/li>\n<li>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/li>\n<\/ul>\n<\/li>\n<li>\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430<\/li>\n<li>\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u0430<\/li>\n<\/ol>\n<p>  5. \u0411\u0443\u0444\u0435\u0440\u044b \u0432\u0435\u0440\u0448\u0438\u043d<\/p>\n<ol>\n<li>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0432\u0435\u0440\u0448\u0438\u043d<\/li>\n<li>Staging \u0431\u0443\u0444\u0435\u0440<\/li>\n<li>\u0411\u0443\u0444\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/li>\n<\/ol>\n<p>  6. Uniform-\u0431\u0443\u0444\u0435\u0440\u044b<\/p>\n<ol>\n<li>\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 layout \u0438 \u0431\u0443\u0444\u0435\u0440\u0430<\/li>\n<li>\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043f\u0443\u043b\u0430 \u0438 sets<\/li>\n<\/ol>\n<p>  7. \u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<ol>\n<li>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>Image view \u0438 image sampler<\/li>\n<li>\u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 image sampler<\/li>\n<\/ol>\n<p>  8. \u0411\u0443\u0444\u0435\u0440 \u0433\u043b\u0443\u0431\u0438\u043d\u044b<\/p>\n<p>  9. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/p>\n<p>  10. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u043f-\u043a\u0430\u0440\u0442<\/p>\n<p>  11. Multisampling<\/p>\n<p>  FAQ  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-324348","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=324348"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324348\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}