Josh Posted October 7, 2023 Share Posted October 7, 2023 I'm seeing these artifacts at the border region of CSM shadows. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted October 8, 2023 Share Posted October 8, 2023 Yep, first brought it up here. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted October 9, 2023 Author Share Posted October 9, 2023 If I isolate each stage in the shader, each one displays fine. I think this is an error in the driver. Added this to PBR/Lighting.glsl at line 269: if (index != 1) return lighttype; 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 10, 2023 Author Share Posted October 10, 2023 I did some more testing and it looks like it might be a memory barrier issue, maybe. The pattern that appears looks similar to another problem I saw in post-effects, but I don't think the directional light shadow stages are all rendering each frame. You can see here the divisions between stages are clean. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 10, 2023 Author Share Posted October 10, 2023 It's got to be a driver bug, or some obscure GLSL rule I don't know about. If I isolate one stage the shadowmap looks fine. It looks to me like there is a problem when the texture that is used in a lookup is not the same across near neighboring pixels... Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 11, 2023 Author Share Posted October 11, 2023 Perhaps another manifestation of the same problem here: Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 11, 2023 Author Share Posted October 11, 2023 Reported to AMD here: https://community.amd.com/t5/opengl-vulkan/cascaded-shadow-map-artifacts-in-glsl/m-p/637524#M5003 Also asking on Khronos forum: https://community.khronos.org/t/glsl-shader-logic-on-amd-cards/110143 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 12, 2023 Author Share Posted October 12, 2023 Probably related, you can see a similar error in the terrain shader. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 13, 2023 Author Share Posted October 13, 2023 I got an interesting response that sounds right: Quote This might be an artifact resulting from indexing and sampling textures using a non Dynamically uniform expression. AMD hardware needs the sample index to be the same for all active invocations inside the subgroup. One fix would be to do: #extension GL_EXT_nonuniform_qualifier : require textures[nonuniformEXT(index)] So wrapping the texture index inside of the nonuniformEXT function which exist exactly for cases where you need non dynamically uniform ressource indexing. https://community.amd.com/t5/opengl-vulkan/cascaded-shadow-map-artifacts-in-glsl/m-p/637976#M5009 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 13, 2023 Author Share Posted October 13, 2023 Maybe an explanation: https://community.khronos.org/t/cascaded-shadow-map-bug-between-splits/66929/11 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 18, 2023 Author Share Posted October 18, 2023 I updated the example with the Vulkan 1.2 nonuniform features and sent a new download link to AMD. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted February 16 Author Solution Share Posted February 16 The core problem of this issue is now solved and will be included in an upcoming update. I never did get the nonuniform feature working. I am not sure if it even works, and I am not sure if it has a negative impact on performance, and I just don't care, 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted February 19 Author Share Posted February 19 On 10/11/2023 at 6:49 PM, Josh said: Probably related, you can see a similar error in the terrain shader. This seems to be fixed on AMD. I am not sure why because I did not merge the terrain textures like I did shadow maps. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.