Semicolons are awesome; They’re easy to use when you know how.
- 0 Posts
- 22 Comments
kayzeekayzee@lemmy.blahaj.zoneto 3DPrinting@lemmy.world•3D Printing Patterns Might Make Ghost Guns More Traceable Than We ThoughtEnglish19·2 days agooh boy can’t wait for printer manufactures to start encoding metadata in every print like 2d printers do
kayzeekayzee@lemmy.blahaj.zoneto Programming@programming.dev•Can somebody explain the graphics stack? Vulkan, OpenGL, Magma, DirectX, SDL, Metal, Mesa, ... wat?English6·4 days agoMy only experience is with gpu-side OpenGL, so here goes:
Your gpu is a separate device designed to run simple tasks with a staggering amount of parallelization. What does that mean? Basically every vertex and pixel on your screen needs to be processed before it can be displayed, and the gpu has a bunch of small cores that do all of that for every single frame your monitor outputs. A programmer defines all this using shaders. In OpenGL, the shader language is called GLSL.
In the opengl graphics pipeline, the cpu-side code defines which effects apply to which geometry in what order. For example, you may want to render every opaque object first, and then draw the transluscent objects on top with semi-transparency (this is called deferred rendering, and is a very common technique). Maybe you’d want a different shadow map for each light-emitting object. Maybe you’d want a setting to define how much bloom to draw to the screen. Maybe you want to provide textures for the gpu to access. The possibilities are endless.
On the gpu-side, we write code in shaders. The shaders, written in GLSL, get compiled by your device-specific drivers into the machine code your hardware uses. In OpenGL there are several types of shader, but there are two main ones: Vertex and Fragment shaders.
Vertex shaders run first. They run on every vertex in the scene and do that math that puts each vertex in the correct location. You can also assign varying values specific to each vertex that get passed down the pipeline to the next shaders.
Between the vertex and fragment shaders, the gpu automatically saves performance by removing any vertex that ends up off-screen, or any triangle that’s definitely not visible to the camera (this is called culling), and then fills in each triangle with pixels called fragments (in a process called rasterization). Each fragment will also have access to the varying value of it’s three vertices interpolated across the face of the triangle (ie the closest triangle will have the most influence).
After this, the fragment shaders are run on every pixel/“fragment” on screen - this is where you’d render effects like lightning and shadows and apply textures. The fragment shaders determine the color of the pixel as it appears on your screen.
There are other specialized shaders you can add too! But your gpu needs to be new enough to support them:
- Compute shaders let you define work groups of threads to do parallel math that’s not directly related to the pixels on screen.
- Tesselation shaders let you break larger geometry down into smaller pieces before rasterization.
- Geometry shaders process each triangle and let you do things like clone geometry, which isnt possible in vertex shaders.
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•Anyone know what this symbol means?English43·4 days agolol reminds me of one of these from the ars goetia
kayzeekayzee@lemmy.blahaj.zoneto Fuck AI@lemmy.world•How does it make you feel when people use LLMs like search engines and then hand you extruded text as though it is factual? Have you seen IRL or just on boards?English1·4 days agoI just use “for EGsample” and “for EXample”
Also “In Eoutherwords”
But for those wondering: ie and eg are actually Latin acronyms!
i.e. - id est - “that is”
e.g. - exempli grata - “for example”
kayzeekayzee@lemmy.blahaj.zoneto Tech@programming.dev•Wall Street’s AI Bubble Is Worse Than the 1999 Dot-com Bubble, Warns a Top EconomistEnglish12·4 days agoI know the moment I try investing in anything, it’ll all come crashing down. You all should be paying me to not invest tbh
I grew up under a rock. What’s this in reference to?
kayzeekayzee@lemmy.blahaj.zoneto Fuck AI@lemmy.world•How does it make you feel when people use LLMs like search engines and then hand you extruded text as though it is factual? Have you seen IRL or just on boards?English4·5 days agoie basically means “in other words”
eg and ex mean “for example”
kayzeekayzee@lemmy.blahaj.zonetoMicroblog Memes@lemmy.world•BRITOTHDYA PRRRYT (original tweet in post for better clarity)English24·7 days agoI tried using an ai image generator, but it couldn’t seem to get it right, so I did it myself on my phone. Also I didn’t know how to make her boobs any bigger, so I just made her head smaller to compensate. Hope you like it!
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•What's something people incorrectly assume about your line of work and/or hobby?English19·7 days agoWhat techniques do you use?
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•Is it just me, or does crime documentaries have a biased "pro-cop" vibe to it?English6·7 days agoWait. You mean to tell me there’s corruption in the corruption factory??
Ender portal countertop
kayzeekayzee@lemmy.blahaj.zoneto Asklemmy@lemmy.ml•Do you use userscripts or other automation options like autohotkey? Which ones do you find most useful? Could you recommend some good sources(including lemmy communities) that are on the topic?English3·9 days agoI used to use ControllerMate until it was abandoned. Imagine AutoHotkey but for mac, and with very advanced block programming.
Still haven’t found anything like it since.
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•Who is a fictional character you have (or had) a crush on?English3·19 days agoThe opossum from Over The Hedge
kayzeekayzee@lemmy.blahaj.zoneto News@lemmy.world•Republican Senator tells House not to vote on bill she just voted forEnglish7·20 days agoSecond this!
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•What's the most unexpectedly useful item you've ever bought under $20?English28·20 days agoOnce found a whole functioning pc (minus ram and the hard drive) at a thrift store for $3. My guess is it came from an office, and when they plugged it in, and when it didn’t work, they assumed it was junk. Actual value of the parts was like $300.
kayzeekayzee@lemmy.blahaj.zoneto Ask Lemmy@lemmy.world•What's a really popular game franchise you just can't get into?English7·20 days agothat is a swealtering take if I’ve ever seen one
kayzeekayzee@lemmy.blahaj.zoneto News@lemmy.world•Fake, AI-generated videos about the Diddy trial are raking in millions of views on YouTubeEnglish2·21 days agoOo! What series?
kayzeekayzee@lemmy.blahaj.zoneto Games@lemmy.world•'Xbox Hardware Is Dead,' Says Founding Team Member, 'It Looks Like Xbox Has No Desire — Or Literally Can't — Ship Hardware Anymore' - IGNEnglish0·22 days agoPart of the problem might be that I literally have no idea what their current console is called? Whoever was in charge of naming the last threeish xbox consoles should be fired out of a cannon
capitalization is not something i care for