Repository navigation
Draw the skybox in a deferred subpass (fixes #162) - #222
Merged
Merged
Conversation
Cubemap is now a resource loaded from one folder with posx..negz faces, in place of the old ten-argument class that was not used. SkyboxSubpass draws a full screen triangle before the deferred composite, and the composite discards pixels that have no geometry. The [Graphics] Skybox config value selects the folder. Fixes #162 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # Assets/Shaders/Deferred/deferred_frag.spv # Assets/Shaders/skybox/skybox.frag.spv # Assets/Shaders/skybox/skybox.vert.spv # FlingEngine/Graphics/src/VulkanApp.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #162.
What this does
Cubemapis a normal resource now.Cubemap::Create("Textures/Skybox/Garden"_hs)loadsposx/negx/posy/negy/posz/negz(png, jpg, jpeg, tga or bmp) from one folder into a cube image with 6 layers. It replaces the old class that took ten arguments and was not used. All faces must be square and the same size; if not, it logs an error and makes no GPU objects. It makes no GPU objects under--null-render.SkyboxSubpass. It draws one full screen triangle with no vertex buffer and no depth test. The fragment shader makes a view ray frominverse(projection * view rotation)and samples the cube map. It runs in the deferred pipeline beforeGeometrySubpass, and it rebuilds its pipeline when the swap chain is resized.deferred.fragdiscards pixels that have no geometry (G-bufferposition.a == 0), so the sky shows through. Without a skybox, those pixels show the black clear color, which looks the same as before.CUBEMAPpipeline flag adds the skybox to the deferred pipeline, andEngine.cppsets it. The new[Graphics] Skyboxvalue inEngineConf.iniselects the folder (defaultTextures/Skybox/Garden). Leave it empty for no skybox.vkCmdDrawtoVulkanFunctions.inl.RenderPipelinedescriptor pool now allowsswap images × subpassessets. Before,GeometrySubpassused all of them.UboSkyboxVS.skybox.vert/frag.spvanddeferred_frag.spv.THIRD_PARTY_NOTICES.md.Testing
check_comment_style.pypasses.Sandbox --null-render --unattended --frames 120 --seed 1exits 0.Not in this PR
.hdrand equirectangular cube maps for IBL. Converting them needs its own render or compute pass. This fits with the reflections work.🤖 Generated with Claude Code