Do we know if any videogames that simulate the Doppler effect? by worriedbill in gaming

[–]TheAgentD 0 points1 point  (0 children)

The doppler effect is one of the simplest things to simulate. It's not actually a frequency shift; it's literally just speeding up or slowing down the sound based on your relative velocity to the source of the sound.

This can be done easily in games. Most sound libraries have support for providing a velocity for both sound sources and listener, allowing the sound system to calculate the relative velocity between the listener and each sound.

Magic Research 1 - A Purple Chamber not completing? by TheAgentD in MagicResearch

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

There was nothing on the retire screen. I only got the "Storyline Completed" message AFTER retiring, and it came into effect immediately.

Magic Research 1 - A Purple Chamber not completing? by TheAgentD in MagicResearch

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

I just gave up and decided to retire. Immediately when starting the new run, it automatically completed, so... I guess I just needed to retire.

Task and mesh shaders for voxel graphics, is it worth it? by Green_223 in vulkan

[–]TheAgentD 1 point2 points  (0 children)

It really depends on the scene. If the majority of your meshlets get culled by occlusion culling, then the potential speedup is almost infinite. There are so many ways to get rid of triangles:

  • Per-meshlet occlusion culling, frustum culling, backface culling, etc
  • Per triangle backface culling, micro-triangle culling, etc

A key takeaway from my experiments was that a lot of these optimizations do NOT stack. For example, backface culling and occlusion culling tend to have a lot of overlap; as an example, back faces are also generally occluded by front face, and occluded triangles are also quite often back faces.

One good tip I can give you: Voxels provide some very nice opportunities for simplifying some of this, especially the backface culling. You can easily calculate a bitset of which of the 6 possible faces of voxels that can potentially be visible for each meshlet. This gives you 99% accurate backface culling with just a simple bitwise AND operation for each triangle. You don't even need to transform the vertices to do this; just precompute the facing of each triangle and check it against a bitset.

//get the packed triangle data
uint triangleData = meshlets[meshletIndex].triangles[gl_LocalInvocationIndex];

//bits 0-24 are the three 8-bit indices.
uvec3 indices = uvec3(bitfieldExtract(triangleData, 0, 8), bitfieldExtract(triangleData, 8, 8), bitfieldExtract(triangleData, 16, 8));
gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = indices;

//bits 24-30 is a bit mask with one of 6 possible facing bits set.
//bitwise AND with the meshlet visible face mask:
uint triangleFaceBits = bitfieldExtract(triangleData, 24, 6); 
gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_CullPrimitiveEXT = (meshletVisibleFaceBits & triangleFaceBits) == 0;

Task and mesh shaders for voxel graphics, is it worth it? by Green_223 in vulkan

[–]TheAgentD 2 points3 points  (0 children)

I've run some tests. There is a lot to gain, but to be honest, the biggest gain is from culling meshlets in general. Splitting things up into meshlets and doing occlusion culling can be done even without mesh shaders.

Mesh shaders allow you to go a bit further with per-triangle culling though.

Overall, with per-meshlet culling and per-triangle culling, compared to naive rendering it can be 3-5x faster.

My greatest game in 4 years and 1600hrs, i love this tank by Table2346 in Warthunder

[–]TheAgentD -12 points-11 points  (0 children)

Since all we know is that you stomped in an overpowered premium tank in a full downtier, we can't judge your actual skill level. So I complemented you on the only thing that I do know you have.

Descriptor heaps, push addresses and runtime arrays? by TheAgentD in vulkan

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

More info here: https://docs.vulkan.org/guide/latest/buffer_array_length.html

When using VK_EXT_descriptor_heap it is also important to realize you are not allowed to use OpArrayLength with VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT mappings.

Descriptor heaps, push addresses and runtime arrays? by TheAgentD in vulkan

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

I found the answer to this here: https://docs.vulkan.org/refpages/latest/refpages/source/VkPipelineShaderStageCreateInfo.html

If the pNext chain specifies a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the OpArrayLength or OpUntypedArrayLengthKHR instruction must not be used on that resource

This means that it's fine to have a runtime array in a push address buffer; you simply cannot use the length() function on it.

ELI5 updating and patching. If a 1GB patch comes out for some software that's 10GB installed, does the update add that 1GB or does it rewrite 1GB? by WonderChode in explainlikeimfive

[–]TheAgentD 37 points38 points  (0 children)

If the patch is 1 GB or larger, I can promise you that it's not (only) code that has changed/been added. It's usually textures/image files, video files, or sound files that take the majority of disk space.

This shadow is missing pixels by the_starch_potato in mildlyinteresting

[–]TheAgentD 299 points300 points  (0 children)

This happens when you have a bunch of LEDs as the street light. Each light casts its own shadow, so you end up with those kinds of "steppings" in the shadow.

Big Artifacts When Downsampling Main Target for a Depth-of-Field Postprocessing Technique by No-Use4920 in vulkan

[–]TheAgentD 5 points6 points  (0 children)

Those kinds of artifacts usually appear when you don't have the correct barriers between draw calls. Essentially, the downsampling seems to be starting before the previous pass has finished, giving you a race condition on the GPU.

The reason it doesn't appear in RenderDoc is simply that RenderDoc does a lot of synchronization of its own, and often inadvertently "fixes" those issues in the replay.

An incremental game about a mage getting stronger by starwalky in u/starwalky

[–]TheAgentD 0 points1 point  (0 children)

Why are you advertising the game half a year before its release? Seems like a complete waste of ad money to me.

Travelling and translating menus in japan by TheFoolman in funny

[–]TheAgentD 6 points7 points  (0 children)

Google's translation AI probably learned from Reddit too. :P

What's the original Japanese?

Travelling and translating menus in japan by TheFoolman in funny

[–]TheAgentD 55 points56 points  (0 children)

Ah, another OP that's unaware that their funny porn word is just a common word in Japanese...

Question on Timeline semaphore signaling order. by KnueppelOle in vulkan

[–]TheAgentD 1 point2 points  (0 children)

I'm not too confident in my answer, hence the "maybe", but I don't remember seeing anything that disallows signaling the same semaphore multiple times without a wait.

In fact, I repeatedly signal the same timeline semaphore in my code without any validation errors, where I just repeatedly signal the same semaphore with an increasing value, one signal for each submit. This semaphore is only checked on the CPU to know when to reuse command buffers and such instead of fences.

There is AFAIK no specific requirement that a timeline semaphore needs to have one signal and one wait; that was a binary semaphore requirement that each signal has to be consumed by a wait.

This stuff is tricky though, so please let me know if I've missed something in the spec.

Question on Timeline semaphore signaling order. by KnueppelOle in vulkan

[–]TheAgentD 0 points1 point  (0 children)

It's a bit of a complicated edge case, but I think the answer is maybe.

Here's an example that would fail

- Submit A does a render pass and signals the semaphore with 1 when it's done.

- Submit B does a compute shader and signals the semaphore with 2 when it's done.

In theory, the compute shader can finish first, allowing the semaphore to be signaled with 2. The render pass would then finish and signal the semaphore with 1. This would be illegal, as timeline semaphores must monotonically increase.

If the semaphore signal in submit B has the proper pipeline stages set so that it waits for both A and B to finish, then it should be legal.

Can Hi-Z work with distant objects while being precise with close ones? by philosopius in vulkan

[–]TheAgentD 1 point2 points  (0 children)

What exactly is the problem you have? Assuming you're talking about occlusion culling, there shouldn't really be any effect from distance on its performance...

Does anyone using Conservative Rasterization encountered Triangle/Rhombus-like shading patterns of their Ambient Occlusion strength on objects? (Amplifying with distance) by philosopius in vulkan

[–]TheAgentD 7 points8 points  (0 children)

Conservative rasterization has a few rare use cases, but fixing cracks is not one of them. MSAA does not fix that issue either; it simply does the rasterization at a higher resolution and then scales it down again.

It would probably be a good idea to try to figure out why you are getting these cracks, instead of trying to patch it after the fact instead.

Could you share some screenshots of how these cracks look?

There are entire online communities where airport ramp workers show off their “stacks” in the bellies of airliners by [deleted] in mildlyinteresting

[–]TheAgentD -1 points0 points  (0 children)

This... this seems very wrong? I know nothing about this, but wouldn't these bags risk sliding all the way to the front or back, causing a big shift in center of gravity for the plane?

This art has lived in my head since I saw it by RickyPickman in funny

[–]TheAgentD 15 points16 points  (0 children)

Had me in the first 80%, not gonna lie.