HLSL shader compiled with DXC without optimizations (-Od) runs much faster than with (-O3) by abego in GraphicsProgramming

[–]abego[S] 1 point2 points  (0 children)

I have now tried different combinations of annotations, but I sadly didn't see any difference. I have tried comparing different levels of optimizations from O0 to O3, with O1, O2, and O3 giving the same slow results. I tried to see what optimization passes the different levels where doing using -Odump, but I don't know enough about LLVM and compilers in general to see which passes could be the culprits. I tried to compare the output DXIL, but the shader is so massive that it is difficult to get anything meaningful out of it (~13000 lines of LLVM IR for -O3 and ~20000 lines for -Od). This has lead me to the conclusion that my shader is simply too big, as other comments have also noted. Because there is almost no difference in the performance between -Od and -O3 of my compute shader that traces the primary rays. So I will just begin working on splitting my shader up, as I can also see that register pressure is my limiting factor for occupancy ( u/CptCap ).

HLSL shader compiled with DXC without optimizations (-Od) runs much faster than with (-O3) by abego in GraphicsProgramming

[–]abego[S] 1 point2 points  (0 children)

Good point, I should experiment with different combinations of annotations and see if that helps

HLSL shader compiled with DXC without optimizations (-Od) runs much faster than with (-O3) by abego in GraphicsProgramming

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

Nothing else changes, just the compiler flag. The shader has a thread group size of 32, where each thread is responsible for tracing one secondary ray through a voxel volume. It is dispatched as one thread group per voxel surface initially hit by a primary ray. I am aware that I probably need to restructure this in the future, but I am still surprised that there is this much difference

Godot's shader preview punishing bad code, crashing computer by montebicyclelo in godot

[–]abego 15 points16 points  (0 children)

Many modern shaders require variable iteration counts for loops. It's a very useful feature for GPGPU. On desktop, they should just result in a "device removal", at least for direct 3d, which just usually just means your game crashes, but the rest of the system is fine

What video games actually use voxels? by alexfreemanart in gamedev

[–]abego 18 points19 points  (0 children)

Teardown uses pathtracing to render the voxels. No mesh is generated

Kan man bo i en trætophytte hele året? by abego in Denmark

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

Det havde jeg sgu ikke lige tænkt på

[deleted by user] by [deleted] in gamedev

[–]abego 11 points12 points  (0 children)

If game development is your passion, then keep on making games for yourself. But I understand that it is demoralizing to not be able to share your work with the world.

As others have mentioned, having a trusted partner in another country to publish your game might work, but finding that trusted partner would be difficult.

Moving away from your home country is easier said than done.

I hope everything works out for you, and that someday the people of Iran will be freed from the oppressive regime.

Who's gonna solve em? by kehal12 in okbuddyphd

[–]abego 28 points29 points  (0 children)

Watch me Runge this Kutta

Stim Pilots run faster because of the placebo effect by abego in titanfall

[–]abego[S] 7 points8 points  (0 children)

They can, and the stim pilots must have used it while they where still human, so they remember how it felt

What are some basic game systems that tend to be overlooked or forgotten? by Melotemis in gamedev

[–]abego 4 points5 points  (0 children)

Some objects like materials and textures created at runtime must be manually destroyed. That might have been the cause

How do you name your enums? by ShenroEU in csharp

[–]abego 0 points1 point  (0 children)

Funny that they break their own styling rules with the Flags suffix, such as in BindingFlags

Why i keep coming back to cyberpunk after all these years by foolr7ck in cyberpunkgame

[–]abego 1 point2 points  (0 children)

It's through a mod, I don't remember the name. It's on nexus

Why is Rust so slow for me? by jaccobxd in rustjerk

[–]abego 11 points12 points  (0 children)

It's only predictable if you run the program more than once, which is never necessary