ソースを参照

Vulkan: update TransparencyAttrib::M_alpha mode to match other renderers

rdb 9 年 前
コミット
8a84613836

+ 1 - 0
panda/src/vulkandisplay/vulkanGraphicsPipe.cxx

@@ -83,6 +83,7 @@ VulkanGraphicsPipe() {
   VkInstanceCreateInfo inst_info;
   inst_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
   inst_info.pNext = NULL;
+  inst_info.flags = 0;
   inst_info.pApplicationInfo = &app_info;
   inst_info.enabledLayerCount = 1;
   inst_info.ppEnabledLayerNames = layers;

+ 1 - 1
panda/src/vulkandisplay/vulkanGraphicsStateGuardian.cxx

@@ -2178,7 +2178,7 @@ make_pipeline(const RenderState *state, const GeomVertexFormat *format,
       att_state[0].srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
       att_state[0].dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
       att_state[0].colorBlendOp = VK_BLEND_OP_ADD;
-      att_state[0].srcAlphaBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
+      att_state[0].srcAlphaBlendFactor = old_alpha_blend ? VK_BLEND_FACTOR_SRC_ALPHA : VK_BLEND_FACTOR_ONE;
       att_state[0].dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
       att_state[0].alphaBlendOp = VK_BLEND_OP_ADD;
       break;