From de9183655e258e574ad79f0134d673668d3a26fc Mon Sep 17 00:00:00 2001 From: Ulrik Guenther Date: Fri, 2 Feb 2024 19:06:01 +0100 Subject: [PATCH 1/3] VulkanRenderer: Add support for multisampled rendertargets --- .../scenery/backends/RenderConfigReader.kt | 1 + .../backends/vulkan/VulkanFramebuffer.kt | 44 +++++++++---------- .../scenery/backends/vulkan/VulkanPipeline.kt | 7 ++- .../backends/vulkan/VulkanRenderpass.kt | 32 +++++++------- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/main/kotlin/graphics/scenery/backends/RenderConfigReader.kt b/src/main/kotlin/graphics/scenery/backends/RenderConfigReader.kt index 06de2c9c4..be21c1e6c 100644 --- a/src/main/kotlin/graphics/scenery/backends/RenderConfigReader.kt +++ b/src/main/kotlin/graphics/scenery/backends/RenderConfigReader.kt @@ -120,6 +120,7 @@ class RenderConfigReader { var dstColorBlendFactor: Blending.BlendFactor = Blending.BlendFactor.OneMinusSrcAlpha, var srcAlphaBlendFactor: Blending.BlendFactor = Blending.BlendFactor.SrcAlpha, var dstAlphaBlendFactor: Blending.BlendFactor = Blending.BlendFactor.OneMinusSrcAlpha, + var samples: Int = 1, var shaders: List = listOf(), @JsonDeserialize(contentUsing = JsonDeserialisers.BindingDeserializer::class) diff --git a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanFramebuffer.kt b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanFramebuffer.kt index 4c1c61844..8781920b3 100644 --- a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanFramebuffer.kt +++ b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanFramebuffer.kt @@ -164,7 +164,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, * * This function also creates the necessary images, memory allocs, and image views. */ - protected fun createAttachment(format: Int, usage: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, name: String = ""): VulkanFramebufferAttachment { + protected fun createAttachment(format: Int, usage: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, name: String = "", samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebufferAttachment { val a = VulkanFramebufferAttachment() var aspectMask: Int = 0 var imageLayout: Int = 0 @@ -195,7 +195,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, .extent(imageExtent) .mipLevels(1) .arrayLayers(1) - .samples(VK_SAMPLE_COUNT_1_BIT) + .samples(samples) .tiling(VK_IMAGE_TILING_OPTIMAL) .usage(usage or VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_TRANSFER_SRC_BIT or VK_IMAGE_USAGE_TRANSFER_DST_BIT) @@ -290,7 +290,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, * Internal function to create a depth/stencil attachment of [format], with * dimensions [attachmentWidth] x [attachmentHeight]. */ - private fun createAndAddDepthStencilAttachmentInternal(name: String, format: Int, attachmentWidth: Int, attachmentHeight: Int) { + private fun createAndAddDepthStencilAttachmentInternal(name: String, format: Int, attachmentWidth: Int, attachmentHeight: Int, samples: Int = VK_SAMPLE_COUNT_1_BIT) { val att = createAttachment(format, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, attachmentWidth, attachmentHeight, name) val (loadOp, stencilLoadOp) = if (!shouldClear) { @@ -305,7 +305,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL } - att.desc.samples(VK_SAMPLE_COUNT_1_BIT) + att.desc.samples(samples) .loadOp(loadOp) .storeOp(VK_ATTACHMENT_STORE_OP_STORE) .stencilLoadOp(stencilLoadOp) @@ -323,7 +323,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, * Internal function to create a new color attachment of format [fornat], with * dimensions [attachmentWidth] x [attachmentHeight]. */ - private fun createAndAddColorAttachmentInternal(name: String, format: Int, attachmentWidth: Int, attachmentHeight: Int) { + private fun createAndAddColorAttachmentInternal(name: String, format: Int, attachmentWidth: Int, attachmentHeight: Int, samples: Int = VK_SAMPLE_COUNT_1_BIT) { val att = createAttachment(format, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, attachmentWidth, attachmentHeight, name) val (loadOp, stencilLoadOp) = if (!shouldClear) { @@ -338,7 +338,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL } - att.desc.samples(VK_SAMPLE_COUNT_1_BIT) + att.desc.samples(samples) .loadOp(loadOp) .storeOp(VK_ATTACHMENT_STORE_OP_STORE) .stencilLoadOp(stencilLoadOp) @@ -353,14 +353,14 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds a float attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addFloatBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addFloatBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 16 -> VK_FORMAT_R16_SFLOAT 32 -> VK_FORMAT_R32_SFLOAT else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16_SFLOAT } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -368,14 +368,14 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds a float RG attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addFloatRGBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addFloatRGBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 16 -> VK_FORMAT_R16G16_SFLOAT 32 -> VK_FORMAT_R32G32_SFLOAT else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16G16_SFLOAT } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -383,14 +383,14 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds a float RGB attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addFloatRGBBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addFloatRGBBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 16 -> VK_FORMAT_R16G16B16_SFLOAT 32 -> VK_FORMAT_R32G32B32_SFLOAT else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16G16B16A16_SFLOAT } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -398,14 +398,14 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds a float RGBA attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addFloatRGBABuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addFloatRGBABuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 16 -> VK_FORMAT_R16G16B16A16_SFLOAT 32 -> VK_FORMAT_R32G32B32A32_SFLOAT else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16G16B16A16_SFLOAT } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples) return this } @@ -413,7 +413,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds an unsigned byte RGBA attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addUnsignedByteRGBABuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addUnsignedByteRGBABuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 8 -> if (sRGB) { VK_FORMAT_R8G8B8A8_SRGB @@ -424,7 +424,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16G16B16A16_UINT } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -432,14 +432,14 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds an unsigned byte R attachment with a bit depth of [channelDepth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addUnsignedByteRBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addUnsignedByteRBuffer(name: String, channelDepth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(channelDepth) { 8 -> VK_FORMAT_R8_UNORM 16 -> VK_FORMAT_R16_UNORM else -> { logger.warn("Unsupported channel depth $channelDepth, using 16 bit."); VK_FORMAT_R16_UNORM } } - createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight) + createAndAddColorAttachmentInternal(name, format, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -447,7 +447,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, /** * Adds a depth buffer attachment with a bit depth of [depth], and a size of [attachmentWidth] x [attachmentHeight]. */ - fun addDepthBuffer(name: String, depth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height): VulkanFramebuffer { + fun addDepthBuffer(name: String, depth: Int, attachmentWidth: Int = width, attachmentHeight: Int = height, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val format: Int = when(depth) { 16 -> VK_FORMAT_D16_UNORM 24 -> VK_FORMAT_D24_UNORM_S8_UINT @@ -457,7 +457,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, val bestSupportedFormat = getBestDepthFormat(format).first() - createAndAddDepthStencilAttachmentInternal(name, bestSupportedFormat, attachmentWidth, attachmentHeight) + createAndAddDepthStencilAttachmentInternal(name, bestSupportedFormat, attachmentWidth, attachmentHeight, samples = samples) return this } @@ -466,7 +466,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, * Adds a swapchain-based attachment from the given [swapchain]. The image will be derived * from the swapchain's image [index]. */ - fun addSwapchainAttachment(name: String, swapchain: Swapchain, index: Int): VulkanFramebuffer { + fun addSwapchainAttachment(name: String, swapchain: Swapchain, index: Int, samples: Int = VK_SAMPLE_COUNT_1_BIT): VulkanFramebuffer { val att = VulkanFramebufferAttachment() att.image = swapchain.images[index] @@ -483,7 +483,7 @@ open class VulkanFramebuffer(protected val device: VulkanDevice, val initialImageLayout = VK_IMAGE_LAYOUT_UNDEFINED att.desc - .samples(VK_SAMPLE_COUNT_1_BIT) + .samples(samples) .loadOp(loadOp) .storeOp(VK_ATTACHMENT_STORE_OP_STORE) .stencilLoadOp(stencilLoadOp) diff --git a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanPipeline.kt b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanPipeline.kt index 494a5b35b..f9df07224 100644 --- a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanPipeline.kt +++ b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanPipeline.kt @@ -81,7 +81,7 @@ class VulkanPipeline(val device: VulkanDevice, val renderpass: VulkanRenderpass, .sType(VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO) .pNext(NULL) .pSampleMask(null) - .rasterizationSamples(VK_SAMPLE_COUNT_1_BIT) + .rasterizationSamples(renderpass.passConfig.samples) val shaderStages = ArrayList(2) @@ -164,6 +164,11 @@ class VulkanPipeline(val device: VulkanDevice, val renderpass: VulkanRenderpass, val (p, pipelineCreateInfo) = when(type) { PipelineType.Graphics -> { + if(device.features.sampleRateShading() && multisampleState.rasterizationSamples() > VK_SAMPLE_COUNT_1_BIT) { + multisampleState.sampleShadingEnable(true) + multisampleState.minSampleShading(0.25f) + } + val pipelineCreateInfo = VkGraphicsPipelineCreateInfo.calloc(1) .sType(VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO) .pNext(NULL) diff --git a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanRenderpass.kt b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanRenderpass.kt index 4553f5e5c..282bd2be1 100644 --- a/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanRenderpass.kt +++ b/src/main/kotlin/graphics/scenery/backends/vulkan/VulkanRenderpass.kt @@ -954,27 +954,29 @@ open class VulkanRenderpass(val name: String, var config: RenderConfigReader.Ren shouldClear = !passConfig.blitInputs, sRGB = config.sRGB) + val samples = pass.passConfig.samples + rt.value.attachments.forEach { att -> logger.info(" + attachment ${att.key}, ${att.value.name}") when (att.value) { - RenderConfigReader.TargetFormat.RGBA_Float32 -> framebuffer.addFloatRGBABuffer(att.key, 32) - RenderConfigReader.TargetFormat.RGBA_Float16 -> framebuffer.addFloatRGBABuffer(att.key, 16) + RenderConfigReader.TargetFormat.RGBA_Float32 -> framebuffer.addFloatRGBABuffer(att.key, 32, samples = samples) + RenderConfigReader.TargetFormat.RGBA_Float16 -> framebuffer.addFloatRGBABuffer(att.key, 16, samples = samples) - RenderConfigReader.TargetFormat.RGB_Float32 -> framebuffer.addFloatRGBBuffer(att.key, 32) - RenderConfigReader.TargetFormat.RGB_Float16 -> framebuffer.addFloatRGBBuffer(att.key, 16) + RenderConfigReader.TargetFormat.RGB_Float32 -> framebuffer.addFloatRGBBuffer(att.key, 32, samples = samples) + RenderConfigReader.TargetFormat.RGB_Float16 -> framebuffer.addFloatRGBBuffer(att.key, 16, samples = samples) - RenderConfigReader.TargetFormat.RG_Float32 -> framebuffer.addFloatRGBuffer(att.key, 32) - RenderConfigReader.TargetFormat.RG_Float16 -> framebuffer.addFloatRGBuffer(att.key, 16) + RenderConfigReader.TargetFormat.RG_Float32 -> framebuffer.addFloatRGBuffer(att.key, 32, samples = samples) + RenderConfigReader.TargetFormat.RG_Float16 -> framebuffer.addFloatRGBuffer(att.key, 16, samples = samples) - RenderConfigReader.TargetFormat.RGBA_UInt16 -> framebuffer.addUnsignedByteRGBABuffer(att.key, 16) - RenderConfigReader.TargetFormat.RGBA_UInt8 -> framebuffer.addUnsignedByteRGBABuffer(att.key, 8) - RenderConfigReader.TargetFormat.R_UInt16 -> framebuffer.addUnsignedByteRBuffer(att.key, 16) - RenderConfigReader.TargetFormat.R_UInt8 -> framebuffer.addUnsignedByteRBuffer(att.key, 8) + RenderConfigReader.TargetFormat.RGBA_UInt16 -> framebuffer.addUnsignedByteRGBABuffer(att.key, 16, samples = samples) + RenderConfigReader.TargetFormat.RGBA_UInt8 -> framebuffer.addUnsignedByteRGBABuffer(att.key, 8, samples = samples) + RenderConfigReader.TargetFormat.R_UInt16 -> framebuffer.addUnsignedByteRBuffer(att.key, 16, samples = samples) + RenderConfigReader.TargetFormat.R_UInt8 -> framebuffer.addUnsignedByteRBuffer(att.key, 8, samples = samples) - RenderConfigReader.TargetFormat.Depth32 -> framebuffer.addDepthBuffer(att.key, 32) - RenderConfigReader.TargetFormat.Depth24 -> framebuffer.addDepthBuffer(att.key, 24) - RenderConfigReader.TargetFormat.R_Float16 -> framebuffer.addFloatBuffer(att.key, 16) + RenderConfigReader.TargetFormat.Depth32 -> framebuffer.addDepthBuffer(att.key, 32, samples = samples) + RenderConfigReader.TargetFormat.Depth24 -> framebuffer.addDepthBuffer(att.key, 24, samples = samples) + RenderConfigReader.TargetFormat.R_Float16 -> framebuffer.addFloatBuffer(att.key, 16, samples = samples) } } @@ -1000,8 +1002,8 @@ open class VulkanRenderpass(val name: String, var config: RenderConfigReader.Ren val fb = VulkanFramebuffer(device, commandPools.Standard, width, height, this@with, sRGB = config.sRGB) - fb.addSwapchainAttachment("swapchain-$i", swapchain, i) - fb.addDepthBuffer("swapchain-$i-depth", 32) + fb.addSwapchainAttachment("swapchain-$i", swapchain, i, passConfig.samples) + fb.addDepthBuffer("swapchain-$i-depth", 32, samples = passConfig.samples) fb.createRenderpassAndFramebuffer() device.tag(fb.framebuffer.get(0), VulkanDevice.VulkanObjectType.Framebuffer, "Framebuffer for swapchain image $i") From d418b1290d6b3dd0aa47ab4d3c6db6db35b75e27 Mon Sep 17 00:00:00 2001 From: Ulrik Guenther Date: Fri, 2 Feb 2024 19:06:59 +0100 Subject: [PATCH 2/3] TextBoard: Increase distance field size, tweak shaders to improve font clarity at small sizes --- .../graphics/scenery/fonts/SDFFontAtlas.kt | 2 +- .../scenery/backends/shaders/TextBoard.frag | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/graphics/scenery/fonts/SDFFontAtlas.kt b/src/main/kotlin/graphics/scenery/fonts/SDFFontAtlas.kt index 534f04ec2..8b7aaff68 100644 --- a/src/main/kotlin/graphics/scenery/fonts/SDFFontAtlas.kt +++ b/src/main/kotlin/graphics/scenery/fonts/SDFFontAtlas.kt @@ -305,7 +305,7 @@ open class SDFFontAtlas(var hub: Hub, val fontName: String, val distanceFieldSiz System.arraycopy(buffer.toByteArray(), 0, a, 0, buffer.size) // we want to arrive at 64x64 per glyph - val scale = 64.0/charSize + val scale = 128.0/charSize val scaledImage = BufferedImage((texWidth*scale).toInt(), (texHeight*scale).toInt(), BufferedImage.TYPE_BYTE_GRAY) val at = AffineTransform.getScaleInstance(scale, scale) diff --git a/src/main/resources/graphics/scenery/backends/shaders/TextBoard.frag b/src/main/resources/graphics/scenery/backends/shaders/TextBoard.frag index 7c44d6140..d8cee6c41 100644 --- a/src/main/resources/graphics/scenery/backends/shaders/TextBoard.frag +++ b/src/main/resources/graphics/scenery/backends/shaders/TextBoard.frag @@ -82,24 +82,30 @@ void main() { // // pattern = aastep(0.5, D); float dist = texture(ObjectTextures[1], Vertex.TexCoord).r; - float width = fwidth(dist); + float width = 0.3 * fwidth(dist); pattern = contour(dist, width); - const float dscale = 0.554; + float center = samp(Vertex.TexCoord, width); + const float dscale = 0.5554; vec2 deltaUV = dscale * (dFdx(Vertex.TexCoord) + dFdy(Vertex.TexCoord)); vec4 box = vec4(Vertex.TexCoord - deltaUV, Vertex.TexCoord + deltaUV); - alphaSum = samp(box.xy, width) + samp(box.zw, width) + samp(box.xw, width) + samp(box.zy, width); + alphaSum = 0.5*center + + 0.125*(samp(box.xy, width) + + samp(box.zw, width) + + samp(box.xw, width) + + samp(box.zy, width)); if(transparent == 1) { // pre-multiplied alpha is very important here to not get artifacts. - pattern = pattern * alphaSum/4.0; - FragColor = vec4(mix(vec3(0.0f), fontColor.rgb, pattern), pattern); + pattern = pattern * alphaSum; + float a = smoothstep(0.2, 0.8, pattern); + FragColor = vec4(mix(vec3(0.0f), fontColor.rgb, a), a); } else { // we use a slightly different sampling here to get larger contours // that end up at the same width as in the transparent case. - pattern = (pattern + 0.5 * alphaSum)/3.0; - float a = smoothstep(0.1, 0.9, pattern); + pattern = pattern * alphaSum*2; + float a = smoothstep(0.2, 0.8, pattern); rgb = mix(backgroundColor.rgb, fontColor.rgb, a); FragColor = vec4(rgb, 1.0); From 62c6b096bde45df48b9db6031bee708e8212382e Mon Sep 17 00:00:00 2001 From: Ulrik Guenther Date: Thu, 18 Apr 2024 21:59:45 +0200 Subject: [PATCH 3/3] DeferredShading/DeferredShadingStereo: Use 4 samples in ForwardShading pass --- .../resources/graphics/scenery/backends/DeferredShading.yml | 1 + .../graphics/scenery/backends/DeferredShadingStereo.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/resources/graphics/scenery/backends/DeferredShading.yml b/src/main/resources/graphics/scenery/backends/DeferredShading.yml index 2837624e5..bd751da40 100644 --- a/src/main/resources/graphics/scenery/backends/DeferredShading.yml +++ b/src/main/resources/graphics/scenery/backends/DeferredShading.yml @@ -106,6 +106,7 @@ renderpasses: renderTransparent: true renderOpaque: false blitInputs: true + samples: 4 shaders: - "DefaultForward.vert.spv" - "DefaultForward.frag.spv" diff --git a/src/main/resources/graphics/scenery/backends/DeferredShadingStereo.yml b/src/main/resources/graphics/scenery/backends/DeferredShadingStereo.yml index 3b4f58a15..3d43e5aa9 100644 --- a/src/main/resources/graphics/scenery/backends/DeferredShadingStereo.yml +++ b/src/main/resources/graphics/scenery/backends/DeferredShadingStereo.yml @@ -165,6 +165,7 @@ renderpasses: renderTransparent: true renderOpaque: false blitInputs: true + samples: 4 shaders: - "DefaultForward.vert.spv" - "DefaultForward.frag.spv" @@ -180,6 +181,7 @@ renderpasses: renderTransparent: true renderOpaque: false blitInputs: true + samples: 4 shaders: - "DefaultForward.vert.spv" - "DefaultForward.frag.spv"