Thread 105997463 - /g/ [Archived: 53 hours ago]

Anonymous
7/23/2025, 12:37:53 PM No.105997463
car
car
md5: 8aab2307812b4e90fb21c5b53ae5a5d2🔍
Remember when you could just write pixels to a buffer and graphics programming was actually fun? Now you can't do anything without reams of boilerplate setting up special objects, managing shaders, marshalling data between the CPU and GPU etc. This is dumb. Why isn't there a programming language that just lets you use the GPU seamlessly to read and write from buffers without any boilerplate?
Replies: >>105997488 >>105997576 >>105997760 >>105997958 >>105998734 >>105999160 >>105999231 >>105999456 >>106000264
Anonymous
7/23/2025, 12:42:16 PM No.105997488
88e94659-0c38-440b-b392-1b4054bb4a41
88e94659-0c38-440b-b392-1b4054bb4a41
md5: e4fe48acfea4ce6d66cd078840a553c8🔍
>>105997463 (OP)
Brokie hands typed this post
Replies: >>105997499 >>105997856
Anonymous
7/23/2025, 12:43:38 PM No.105997499
>>105997488
Literally who? I don't do zoomer e-celebs.
Replies: >>105997823
Anonymous
7/23/2025, 12:59:29 PM No.105997576
>>105997463 (OP)
Zoomer here I was wondering the same, why can't I just be like - hey, change pixel 1 to this color and pixel 2 to that. what a load of bullshit.

There's tons more bullshit in this field I can't remember at this moment id make a list
Replies: >>105997640 >>105997958
Anonymous
7/23/2025, 1:09:58 PM No.105997640
>>105997576
>why can't I just be like - hey, change pixel 1 to this color and pixel 2 to that.
Because of parallelism, but there's still no reason why a programming language couldn't have a construct that lets you run a callback with type (buff: int32[][], x: int, y: int)->void on the GPU (with some implicit restrictions about what it can read and write) and other such features.
Replies: >>105997766
Anonymous
7/23/2025, 1:28:19 PM No.105997760
>>105997463 (OP)
>My IQ is too low to deal with programming
Doesn't affect me
Anonymous
7/23/2025, 1:29:21 PM No.105997766
>>105997640
That's extremely trivial to write. You should learn how to program instead of whining. You could be experimenting right now.
Replies: >>105997846
Anonymous
7/23/2025, 1:38:22 PM No.105997823
>>105997499
Joe Blow
Anonymous
7/23/2025, 1:40:44 PM No.105997846
>>105997766
It is trivial and yet whatever gay programming language you use doesn't do it. Sad! I've more or less worked out the semantics for a language that allows seamless CPU/GPU coordination without it being too smart for its own good but creating and maintaining a programming language is a forever-project.
Anonymous
7/23/2025, 1:42:06 PM No.105997856
>>105997488
is he still playing with toy opengl programs because "thats what i have around"?
Anonymous
7/23/2025, 1:58:37 PM No.105997958
>>105997576
>>105997463 (OP)
why are you niggers so retarded that you can't understand the concept of a command buffer?
Replies: >>105998036
Anonymous
7/23/2025, 2:05:51 PM No.105998036
>>105997958
I think a big part of the reason why we don't have better tools for working with the GPU is that shitting out boring heaps of boilerplate is an ecological niche that attracts a certain crowd of subpar "programmers" (e.g.) who pride themselves on understanding what a command buffer is. They don't want any improvements because it destroys their area of "expertise".
Replies: >>105998043 >>105998087
Anonymous
7/23/2025, 2:06:52 PM No.105998043
>>105998036
e.g. you*
Anonymous
7/23/2025, 2:13:09 PM No.105998087
>>105998036
>heaps of boiler plate
a full fledged vulkan renderer, including multithreaded command buffer submission, deferred rendering, efficient memory sub-allocation and defragmenting, pipeline caching, and surface support is less than 3k lines of code, and the most basic 2005 level rendering is 1k lines of code.

It's not nearly as much boilerplate as you think. People, even "professionals", who use some framework constantly are plagued with undebuggable errors because they think they need said framework for "the hard stuff"

And yes I agree that there are a bunch of trannies who only do plumbing work like this because they are scared to write a shader
Replies: >>105998143
Anonymous
7/23/2025, 2:20:19 PM No.105998140
nothing stopping you from software rendering

have fun software rendering at 4k tho
Anonymous
7/23/2025, 2:20:28 PM No.105998143
>>105998087
>most basic rendering is 1k lines of code
No, thanks. That number should be 0 (ZERO!) unless you're writing an optimized game engine.
Replies: >>105998157
Anonymous
7/23/2025, 2:22:13 PM No.105998157
>>105998143
oh ok so you're just retarded then

you can literally copy and paste the code and treat it as a black box that exposes 2-3 functions, no different from threejs, but you are just a bit too retarded to handle that
Replies: >>105998254
Anonymous
7/23/2025, 2:25:03 PM No.105998192
Just use Raylib or something.
Anonymous
7/23/2025, 2:33:04 PM No.105998254
>>105998157
>it's just 1k lines of code
>just copy paste
>etc.
You are cancer. It should take 0 (ZERO!) lines of code to run a function that references CPU-side constants and variables on the GPU to process some shared buffer. No setup, no compiling shaders, no binding uniforms, nothing. It should be normal code.
Replies: >>105998859
Anonymous
7/23/2025, 3:31:06 PM No.105998734
>>105997463 (OP)
>Why isn't there a programming language that just lets you use the GPU seamlessly to read and write from buffers without any boilerplate?
you can do this in every language. it's just less efficient
Replies: >>105998829
Anonymous
7/23/2025, 3:43:23 PM No.105998829
>>105998734
>you can do this in every language.
Provide an example.

>it's just less efficient
I don't care.
Replies: >>105998940
Anonymous
7/23/2025, 3:48:30 PM No.105998859
>>105998254
no no, it is normal code, you are unfortunately just too dumb to understand it.

you understand that when you include some library, you are effectively copy pasting it?
Replies: >>105998871
Anonymous
7/23/2025, 3:50:07 PM No.105998871
>>105998859
You sound mentally ill and this is boring. The sad part is that I'm almost certainly more proficient at modern graphics programming than you. You're just 80 IQ and can't grasp what's being said.
Anonymous
7/23/2025, 4:01:45 PM No.105998940
>>105998829
https://kevinboone.me/linuxfbc.html
there is some boilerplate to memorymap the framebuffer, and you'll need root priviledges, but after that you can draw shapes in the tty.
Without root, you can use SDLs https://wiki.libsdl.org/SDL3/SDL_LockTexture to get a buffer of pixels.
Replies: >>105998969
Anonymous
7/23/2025, 4:04:23 PM No.105998969
>>105998940
That's not using the GPU to process the buffer.
Replies: >>105999055
Anonymous
7/23/2025, 4:15:09 PM No.105999055
>>105998969
Ah, I misread. I'm sure opengl will have some methods of getting a buffer, manipulating it and rendering it afterwards, but yeah, it'll have some boilerplate at least
Replies: >>105999155
Anonymous
7/23/2025, 4:28:30 PM No.105999155
>>105999055
This:
https://pastebin.com/raw/af3ib8xw

Should be this:
#import graphics

int main() {
const W = 512, H = 512;
shared int32[][] buff1 = new int32[W][H];
shared int32[][] buff2 = new int32[W][H];
int radius = 5;

//...
// .. fill buff1
// ...

while(!close_window()) {

gpu_pass(W, H) {
vec4 sum = vec4(0.0);

for(int i = -radius; i <= radius; ++i) {
sum += buff1[x + i][y];
}

buff2[x][y] = sum / float((radius * 2 + 1));
}

gpu_pass(W, H) {
vec4 sum = vec4(0.0);

for(int i = -radius; i <= radius; ++i) {
sum += buff2[x][y + i];
}

buff1[x][y] = sum / float((radius * 2 + 1));
}

blit(screen, buff1);
}
}


And no one can convince me otherwise.
Anonymous
7/23/2025, 4:29:04 PM No.105999160
>>105997463 (OP)
>remember
that was never the case, look up doom, quake 1/2 source code
Replies: >>105999219
Anonymous
7/23/2025, 4:36:05 PM No.105999219
>>105999160
I'm familiar with the Doom and Quake 1 code bases. What's your point? In the DOS era it took like 10 lines of code to set up mode 13h and then you were free to do whatever you want, however you want, just by writing some buffers.
Replies: >>105999283
Anonymous
7/23/2025, 4:37:07 PM No.105999231
>>105997463 (OP)
>write pixels to a buffer
LOL, this whippersnapper has never raced the beam.
Anonymous
7/23/2025, 4:42:34 PM No.105999280
Basic Graphics
Basic Graphics
md5: 49a99d342c37d4acd8d9cc10a248211c🔍
This was all you needed in Microsoft Color Basic to enter a graphics mode and draw a circle.
Replies: >>106000239
Anonymous
7/23/2025, 4:42:42 PM No.105999283
>>105999219
and? it has nothing to do with GPU
Replies: >>105999297
Anonymous
7/23/2025, 4:44:17 PM No.105999297
>>105999283
> it has nothing to do with GPU
Yeah. That's the problem, retard. There's no real reason you shouldn't be able to do roughly the same with modern GPGPUs that support compute shaders.
Anonymous
7/23/2025, 5:04:33 PM No.105999455
Why should a
>language
be in charge of handling the GPU calls?
Replies: >>105999487
Anonymous
7/23/2025, 5:04:53 PM No.105999456
>>105997463 (OP)
This would look better with motion blur and bloom
Anonymous
7/23/2025, 5:07:38 PM No.105999487
>>105999455
Why should a
>language
be in charge of handling the CPU calls?
Anonymous
7/23/2025, 6:35:13 PM No.106000239
>>105999280
Damn we did that in computer classes back in like 2002. I made a whole space launch pad with a shitload of moving objects, the whole animation would take like two minutes on ancient school PCs. Should still have the notepad with all the code written somewhere at parents' house.
Anonymous
7/23/2025, 6:37:32 PM No.106000264
>>105997463 (OP)
you can use this
https://github.com/zserge/fenster