HN user

nice_byte

1,124 karma
Posts39
Comments349
View on HN
www.youtube.com 6mo ago

Shouting In The Data Center (2009) [video]

nice_byte
1pts0
en.wikipedia.org 6mo ago

Non-Photo Blue

nice_byte
7pts0
www.youtube.com 6mo ago

Making a game engine based on dynamic signed distance fields [video]

nice_byte
3pts1
gpfault.net 6mo ago

Representing Hierarchies

nice_byte
2pts0
seminumerical.io 6mo ago

My 20-Year-Old Program

nice_byte
4pts0
sunfishcode.github.io 7mo ago

Canonicalization

nice_byte
2pts0
gpfault.net 7mo ago

A Couple 3D AABB Tricks

nice_byte
5pts0
en.wikipedia.org 9mo ago

Prester John

nice_byte
4pts0
fgiesen.wordpress.com 9mo ago

Content Creator

nice_byte
4pts0
gpfault.net 9mo ago

More About Jumps Than You Wanted to Know

nice_byte
22pts0
gpfault.net 1y ago

More About Jumps Than You Wanted to Know

nice_byte
5pts0
en.wikipedia.org 1y ago

D.B. Cooper

nice_byte
6pts0
www.youtube.com 2y ago

Vulkan Synchronization Made Easy [video]

nice_byte
2pts0
gist.github.com 3y ago

Generic dynamic array in 60 lines of C

nice_byte
91pts104
gpfault.net 5y ago

Let’s Learn x86-64 Assembly: Part 0 – Setup and First Steps

nice_byte
180pts38
gpfault.net 6y ago

Metaprogramming in Flat Assembler

nice_byte
2pts0
gpfault.net 6y ago

Metaprogramming in Flat Assembler

nice_byte
90pts5
gpfault.net 6y ago

Let's Learn x86-64 Assembly Part 0 – Setup and First Steps

nice_byte
8pts0
gpfault.net 6y ago

Parametric L-System Sandbox

nice_byte
1pts0
gpfault.net 7y ago

Emulating Command Buffers in OpenGL – Part 2

nice_byte
1pts0
blog.google 7y ago

Project Stream

nice_byte
30pts8
gpfault.net 7y ago

Dissecting a Shader Quine

nice_byte
71pts12
gpfault.net 8y ago

Superformula

nice_byte
2pts0
gpfault.net 8y ago

Type-safe Bitmasks in C++

nice_byte
97pts40
gpfault.net 8y ago

Generating Trees and Other Interesting Shapes with L-Systems

nice_byte
1pts0
gpfault.net 8y ago

GPU-Accelerated Particles with WebGL 2

nice_byte
5pts0
gpfault.net 9y ago

GPU-Accelerated Particles with WebGL 2

nice_byte
2pts0
gpfault.net 9y ago

My Gripes with WebGL

nice_byte
5pts0
gpfault.net 9y ago

In Praise of Drop-In Libraries

nice_byte
2pts0
gpfault.net 9y ago

Using Perlin Noise to Generate 2D Terrain and Water

nice_byte
3pts0

Not really. Besides the problems with ringing outlined in the post, the number of coefficients required to capture higher frequency detail grows quadratically, requiring not only more storage but also operations to evaluate. Which makes straightforward cubemap replacement impractical.

Author here. Please let me know if the sample code doesn't work for you. It's all single threaded dumb JavaScript which makes it very easy to read, but definitely not performant. I decided to stick with it for didactic reasons, but still worried that it may hang someone's browser.

I don't know, I'm not convinced with this argument.

The "ugly" version with the switch seems much preferable to me. It's simple, works, has way less moving parts and does not require complex machinery to be built into the language. I'm open to being convinced otherwise but as it stands I'm not seeing any horrible problems with it.

no. it was the first question I asked and was given a satisfactory explanation (along the lines of, "this adds things to your program that help it write text to the screen.")

Yeah I misused the term "token". What I really meant is that they should just be token separator and nothing more (i.e. once we encounter whitespace it means the current token has ended)

I have really just one wish when it comes to syntax: no syntactically significant whitespace. Space, newline, tab, etc. should ALL map to the same exact token. In practice this also means semicolons or something like them are needed as well, to separate expressions/statements. I dislike langs that try to insert semicolons for you, but at least it's better than the alternative.

the way python treats whitespace is a huge design mistake that has probably wasted like a century (if not more) worth of time across all users, on something really trivial.

Lena by qntm (2021) 5 months ago

tl;dr yes it is

she did not explicitly consent for that photo to be used in computer graphics research or millions of sample projects. moreover, the whole legality of using that image for those purposes is murky because I doubt anyone ever received proper license from the actual rights-holder (playboy magazine). so the best way to go about this is just common-sense good-faith approach: if the person depicted asks you to please knock it off, you just do it, unless you actively want to be a giant a-hole to them.

Lena by qntm (2021) 5 months ago

the "porn" angle is very funny to me, since there is nothing pornographic or inapropriate about the image. when I was young, I used to think it was some researcher's wife whom he loved so much he decide to use her picture absolutely everywhere.

it's sufficient to say that the person depicted has withdrawn their consent for that image to be used, and that should put an end to the conversation.

Lena by qntm (2021) 5 months ago

Everybody knows that. The GP's reaction is what perplexes me. Are they saying the name of the story is inappropriate? I think it's very appropriate.

Lena by qntm (2021) 5 months ago

when you read this and its follow-up "driver" as a commentary on how capitalism removes persons from their humanity, it's as relevant as it was on day one.

good sci fi is rarely about just the sci part.

I want the simple approach in addition what exists now, so we can both have our cakes.

The simple approach can be implemented on top of what Vulkan exposes currently.

In fact, it takes only a few lines to wrap that VMA snippet above and you never have to stare at those pesky structs again!

But Vulkan the API can't afford to be "like CUDA" because Vulkan is not a compute API for Nvidia GPUs. It has to balance a lot of things, that's the main reason it's so un-ergonomic (that's not to say there were no bad decisions made. Renderpasses were always a bad idea.)

It's explicitly saying you want device memory

You are also explicitly saying that you want device memory by specifying DEVICE_LOCAL_BIT. There's no difference.

Likewise, your claim about UMA makes zero sense. Device malloc gets you a pointer or handle to device memory,

It makes zero sense to you because we're talking past each other. I am saying that on systems without UMA you _have_ to care where your resources live. You _have_ to be able to allocate both on host and device.

Like, why is there gpu-only and device-local.

Because there's such a thing as accessing GPU memory from the host. Hence, you _have_ to specify explicitly that no, only the GPU will try to access this GPU-local memory. And if you request host-visible GPU-local memory, you might not get more than around 256 megs unless your target system has ReBAR.

a theoretical vkMalloc should always give me device memory.

No, because if that's the only way to allocate memory, how are you going to allocate staging buffers for the CPU to write to? In general, you can't give the copy engine a random host pointer and have it go to town. So, okay now we're back to vkDeviceMalloc and vkHostMalloc. But wait, there's this whole thing about device-local and host visible, so should we add another function? What about write-combined memory? Cache coherency? This is how you end up with a zillion flags.

This is the reason I keep bringing UMA up but you keep brushing it off.

No you don't, cuMemAlloc(&ptr, size) will just give you device memory, and cuMemAllocHost will give you pinned host memory.

that's exactly what i said. You have to explicitly allocate one or the other type of memory. I.e. you have to think about what you need this memory _for_. It's literally just usage flags with extra steps.

Why would UMA be necessary for this?

UMA is necessary if you want to be able to "just allocate some memory without caring about usage flags". Which is something you're not doing with CUDA.

OpenGL handles this trivially,

OpenGL also doesn't allow you to explicitly manage memory. But you were asking for an explicit malloc. So which one do you want, "just make me a texture" or "just give me a chunk of memory"?

Let me create a texture handle, and give me a function that queries the size that I can feed to malloc. That's it. No heap types, no usage flags.

Sure, that's what VMA gives you (modulo usage flags, which as we had established you can't get rid of). Excerpt from some code:

``` VmaAllocationCreateInfo vma_alloc_info = { .usage = VMA_MEMORY_USAGE_GPU_ONLY, .requiredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT};

VkImage img; VmaAllocation allocn; const VkResult create_alloc_vkerr = vmaCreateImage( vma_allocator, &vk_image_info, // <-- populated earlier with format, dimensions, etc. &vma_alloc_info, &img, &allocn, NULL); ```

Since i dont care about reslurce aliasing, that's the extent of "memory management" that i do in my rhi. The last time i had to think about different heap types or how to bind memory was approximately never.

I had stopped using linux at the start of the systemd takeover (it was not because of systemd).

What I don't understand is how this has happened. I didn't care either way but everybody who did seemed to really fucking hate systemd. Then how come it became the default in so many distributions, with so much opposition from the community?

it's hard to believe that using simd extensions in rust is still as much of a chaotic clusterfudge as it was the first time I looked into it. no support in standard library? 3 different crates? might as well write inline assembly...