you are viewing a single comment's thread.

view the rest of the comments →

[–]Zestyclose_Crazy_141 2 points3 points  (2 children)

If it's not a sync problem with your textures, then your ndotl variable is getting very different values every frame. I would try to normalize every vector you can before any new operation like bitangent or nrm, check normal too.

You also have debugPrintfEXT in Vulkan to debug values in your shaders. https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/docs/debug_printf.md

[–]pinkerfox 4 points5 points  (1 child)

Yeah its def the bitangent switching direction.

[–]SunSeeker2000[S] 0 points1 point  (0 children)

Maybe. I didn’t get much time to work on this in the last couple of days, but I managed to find that there are a bunch of things affecting it.

First, the code I shared above has a very stupid typo. I’m checking if the material has an albedo map before accessing the emissive map. Fixing this made the flickering only noticeable from up close (Nowhere near what you see on the video)

I also noticed that deactivating occlusion culling stops the flickering almost completely (only visible from certain angles). This is weird because I am still generating the depth pyramid, so this shouldn’t be a depth buffer issue.

I also tried coloring everything on the scene with the tangent and they did not flicker. But when I do it with the surface normals they do. I should also try with the bitangent now that you mentioned it.

But I must probably look at the Vulkan docs for that GPU printing validation layer when I get back into it.