Tumgik
#graphics programming
cerulity · 10 months
Text
OpenGL & Vulkan are like Portal & Portal 2
OpenGL = Portal Vulkan = Portal 2
Both are made by the same people, have the same motivations, are made in the same language. Experiencing the former is a good experience. However, experiencing the latter is a whole other dimension of interesting. OpenGL is fun to learn, and Portal is fun to play. But I’ve decided to start using Vulkan, and god damn, there’s a lot. You have to enumerate through and interface with devices, you have to create debug messengers, validation layers, buffers, arrays, etc.. Portal 2 gave me that same feeling. (Spoilers for Portal 2): [Falling down into Test Shaft 09 was the moment I realized this game is a lot deeper than I thought. You have to manage repulsion and propulsion gels, tractor beams, faith plates, lasers, and more.] Once you use OpenGL/play Portal, you start to get good at it and can crank out a playthrough/project in a few hours. With Vulkan/Portal 2, it takes a hell of a lot more dedication, but by god its worth it.
76 notes · View notes
blake447 · 3 months
Text
Back to dragon curve shaders
Tumblr media
I'm once again playing with dragon curve shaders, this time with a unity implementation. Friendly reminder this is an entirely parallelized gpu implementation, something which is not an easy task to derive!
We've made some serious optimizations this time with our newfound number theory interpretation, though it cant handle as large of numbers as my old matrix multiplication interpretation, because I haven't hard-coded the higher precision types. Still this should be able to handle ~31 iteration dragon curves, and it will do so re-generating it in real time. I've yet to profile it but Just looking at the code it should be much cleaner.
Tumblr media
In fact, I can fit the fragment shader and Dragon method into a single screenshot, and look at how clean it looks! Granted we're missing some bells and whistles from the old version, but I'm still happy with this. The only new math I haven't posted about before here is the way I'm shading the curve itself.
Tumblr media
Basically, we keep track of some running index. Turns out, the direction you fold the curve alternates, then the direction you fold each of those new little sections alternates, and so on. Basically if you keep track of the turns in binary (0 for turning ccw, 1 for turning cw) you just get a number ranging from 0 to however many segments are on the curve. Divide it by the number of segments and you get a normalized position from 0-1. There's a little bit of artifacting because my method only applies to midpoints and I haven't handled all the other needed calculations, but it works well enough
20 notes · View notes
askagamedev · 7 days
Note
Regarding your latest answer about optimizing games. Can you elaborate more on how the optimization gets to happen? Like ofcourse they do want to make their npcs look as good as they planned to so how do they optimize without reducing quality in general?
Optimization tends to be tailored to the specific tasks at hand. Programmers on large projects often build or use out-of-the-box tools called profilers that measure performance in specific areas of the code. Based on the profiler reports, the engineers can see where the majority of processing time is being spent and then consider looking into optimizing the heaviest offenders.
Tumblr media
If we're optimizing the visuals specifically, then it's a question of what saves the most processing time. The best optimization is often not to render anything at all. If the hardware doesn't have to render and animate a thing, it saves a lot of processing time. We do this by not rendering models that the player can't see (e.g. stuff off-camera, stuff behind walls, stuff too far off in the distance, etc.), and also by not rendering the parts of the model that the player can't see (e.g. if you're looking at the front of a building, you can't see the back of the building at the same time without a mirror or something behind it).
Tumblr media
That's only one example of optimizations we make. We load cheaper models and/or textures for things that are far away (LODs), we can reduce the frequency of animation updates for characters in the background or on the peripheral edges of the camera that players aren't focusing on, and so on. There are as many ways to save processing time as there are ways to spend it. If you have the time and interest, I suggest looking at the #game optimization tag on this blog, since I've written at length about various means of optimization in past posts.
[Join us on Discord] and/or [Support us on Patreon]
Got a burning question you want answered?
Short questions: Ask a Game Dev on Twitter
Long questions: Ask a Game Dev on Tumblr
Frequent Questions: The FAQ
15 notes · View notes
sudowrestler · 4 months
Text
Here are some notes describing a general 3D transformation pipeline as typically used in 3D software and games. They helped me understand in concrete terms how 4x4 matrices are used for graphics. Maybe they'll help you too.
This assumes a working knowledge of matrices, and even some level of intuition for how transformations are laid out in matrix form. If anyone is interested in a more fleshed-out clarification for those less familiar, I may write a more thorough explanation of the processes described here.
4 notes · View notes
bizarre-furry-bastard · 3 months
Text
the only things a trans woman wants in life is estrogen and a non hacky way to debug GLSL shaders
5 notes · View notes
technician-the · 2 days
Text
4 notes · View notes
3dartblade · 2 months
Text
After messing around with graphics programming, I've come to the natural conclusion:
It's time to build my own console
2 notes · View notes
spinkdinky · 2 months
Text
Tumblr media
Texture and color technique study
2 notes · View notes
Video
setup a constant buffer and wired it up to imgui. the DirectX12 studies continue...
2 notes · View notes
graph100 · 2 years
Text
yknow what fuck it
one of these days soon imma start a blog focusing on shitty old opengl renders
"webcore" this, "early internet" that, "y2k" whatever whatever
the absolute power that some hacked together 3rd project by a dev still figuring out lwjgl 2 or like glfw or glut or smth has more power than that tbh
like you cant tell me that innapropriately detailed textures without any lighting for a game that is probably just a proof of concept that a dev can like use c++ or java 1.4 is immaculate vibes
6 notes · View notes
morag-stilwell · 2 months
Text
Tumblr media
Just finished a Game of Life Simulation introductory learning project in WebGPU
Look at them go, so pretty-
This is the link to the course, for anyone interested: codelabs.developers.google.com/your-first-webgpu-app
0 notes
agatedragongames · 3 months
Text
Simple sharpen shader using a kernel
This tutorial will show you how to create a sharpen shader using a kernel.
Tumblr media
View On WordPress
0 notes
c-rowlesdraws · 4 months
Text
Adobe Illustrator. Industry standard, huge brand recognition, whatever; the more I use it the more incredibly annoying weird bullshit I discover about it. One day raster/vector technology is going to undergo some sort of revolutionary change and new programs are going to smash Adobe Illustrator into oatmeal and I will not be upset about it at all
268 notes · View notes
askagamedev · 2 years
Note
Hi, Dev! I recently got into modding Skyrim for the first time. I started getting higher fidelity visual mods such as 8k textures and such. This might be a dumb question but how is that even possible? Of course being on a powerful PC is a big part. But I thought games and their engines had memory and graphical limitations of their own.
Tumblr media
The first set of constraints are during development - the assets that are created. It won't actually matter if the game can potentially display 4K, 8K, 16K, or 128K textures if there aren't 4K, 8K, 16K, or 128K texture assets to load. Somebody actually has to take the time to create those assets for the game to load them at the appropriate times. We typically don't put in code to upscale textures, they need to be added to the assets and loaded at the appropriate time in-game.
Tumblr media
The second set of constraints are at run time - the system resources of the machine it is on. If the system has little memory or a slow CPU/GPU, there are fewer overall system resources to work with compared to a system with a faster CPU/GPU and more system memory. The other potential technical bottleneck is the [architecture of the game]. If the game was built using 32 bit architecture, it will only be able to use up to approximately 4 gigabytes of memory. If the game was built with 64 bit architecture, it can use up to approximately 2300 petabytes of memory. As long as the game can run within 2300 petabytes of memory, it's fine.
Tumblr media
Thus, if the game is built on 64-bit architecture on a beefy machine and has 8k texture packs and code to know when to load those 8k textures, it should be able to run those even if the original game never had such high res textures to begin with.
[Join us on Discord] and/or [Support us on Patreon]
The FANTa Project is being rebooted. [What is the FANTa project?]
Got a burning question you want answered?
Short questions: Ask a Game Dev on Twitter
Long questions: Ask a Game Dev on Tumblr
Frequent Questions: The FAQ
30 notes · View notes
rhythmmortis · 8 months
Text
Tumblr media Tumblr media Tumblr media
324 notes · View notes
zoeythebee · 4 months
Text
Behold! The single greatest thing I've ever programmed!
177 notes · View notes