Earlier quoted context omitted.
I'd say the unintuive part is mostly a problem only if you abuse fragment shaders for something they weren't meant to be used for. All the fancy drawings that people make on shadertoy are cool tricks but you would very rarely do something like that in any practical use case. Fragment shaders weren't meant to be used for making arbitrary drawings that's why you have high level graphic APIs and content creation softwar…
Don't games make arbitrary drawings using fragment shaders all the time? Clouds, water lava, slime, explosions etc.
Shaders: How to draw high fidelity graphics with just x and y coordinates
81–90 of 93 posts
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#82Earlier quoted context omitted.
To elaborate on this, Vulkan is an open _standard_ whose many implementations (user mode driver) may or may not be open source. Vulkan is just a header file, it's up to the various independent hardware vendors (IHVs) to implement it for their platform. Also a small correction: Vulkan actually _does_ run Apple platforms (via Vulkan-to-Metal translation) using MoltenVK and the new KosmicKrisp driver, and it works quite…
If you're going to claim MoltenVk = Vulkan on Mac then you might as well claim Wine / Proton = DirectX on Linux.
DXVK, vkd3d on the other hand is propped up by dozens of passionate open-source contributors.
I'm drawing my lines not based on technicalities, but on the reality of the situation when it comes to how much the "controlling entity" of each API cares about supporting your platforms. And the fact is, Khronos has put time and money into supporting more platforms than Microsoft has.
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#83Earlier quoted context omitted.
Depends on which extensions, things is with Khronos APIs people always forget to mention the extension spaghetti that makes many use cases proprietary to a specific implementation.
DirectX also suffers from it, to a lesser degree. There are important HLSL intrinsics that are vendor-dependent ( https://github.com/Microsoft/DirectXShaderCompiler/wiki/Wave... or https://github.com/NVIDIA/nvapi/blob/main/nvHLSLExtns.h ). Microsoft used to be more proactive. It pressured vendors to have rough feature parity with each other and then released the "harmonized" baseline as the next DirectX version. But…
The point is that many that argue Khronos APIs are portable, don't seem to have deal how portable they actually are in practice, just like POSIX is portable only to certain extent, or Web standards (which then many just ship Chrome with their app).
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#84Check out this clip by tossing where he ports a GLSL Shader to C without using any graphics API. https://www.youtube.com/watch?v=xNX9H_ZkfNE
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#85Earlier quoted context omitted.
> Vulkan is an open _standard_ That too kinda depends on where you draw the line, the spec text is freely available but all development happens behind closed doors under strict NDA. From an outsiders perspective it doesn't feel very open to get completely stonewalled by Khronos on the status of a feature that debuted in DirectX or CUDA well over a year ago, they won't even confirm whether it's on their roadmap.
Sure, that's true and a pretty valid criticism of the system. My definition of open is that Khronos doesn't restrict (as far as I know) what platforms Vulkan can be implemented on. The same cannot be said for DX12 or Metal.
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#86Obligatory "this painting is a mathematical formula, a big function on the x and y coordinates of each pixel" video from Iñigo Quilez. https://www.youtube.com/watch?v=8--5LwHRhjk
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#87Shaders technically don't even know their X and Y coordinates by default unless you specifically provide those, just as you can provide other coordinates (such as U and V for surfaces) or other values in general (either varying / input attributes, like fragment coordinates typically are, or uniforms, which are the same for every invocation).
>Shaders technically don't even know their X and Y coordinates by default unless you specifically provide those im kind of a boomer regarding shaders but isnt gl_FragCoord always available?
@builtin(position) fragCoord: vec4fRe: Shaders: How to draw high fidelity graphics with just x and y coordinates
#88Does anyone have any resources for learning how to do very beautiful clean technical drawings like this? I have some art skill but not the kind that translates to such clean technical drawings with this nice personality. Would love to be able to make some for my own projects.
From the home page: Question: How do you make the illustrations? Answer: I get asked this more than anything else but honestly, I don't have a good answer. I make them by hand, in Figma. There's no secret - it's as complicated as it looks. The Advanced Edition of the book will include a tutorial explaining how I make them, where I get references and inspiration from.
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#89I see lots of shader related videos but to me the worst part of GPU code is that the setup is archaic and hard to understand. Does anyone have a good resource for the stages such as: - What kind of data formats do I design to pipe into the GPU? Describe like i'm five texcels, arrays, buffers, etc. - describe the difference between the data formats of traditional 3D workflow and more modern compute shader data formats…
Shameless plug, but I wrote some blog posts because I had a lot of the same questions. In my case, I wanted to learn the WebGL APIs, so I wrote two posts: * https://avikdas.com/2020/07/08/barebones-webgl-in-75-lines-o... * https://avikdas.com/2020/07/21/barebones-3d-rendering-with-w... I still go back to them myself to refresh my memory. It's funny that I called this a lot of boilerplate, but Vulkan is known to have…
Re: Shaders: How to draw high fidelity graphics with just x and y coordinates
#90Earlier quoted context omitted.
Vulkan also runs on Apple Silicon without translation on linux
It actually requires translation everywhere. GPUs have their own internal API that Vulkan, OpenGL, DirectX, etc. translate into. That is what drivers do.
You can run Vulkan on Apple Silicon as natively as you can run Metal, even if some parts of it don't map too nicely to the hardware.
We only seriously say translate when we go from one high level API to another, just like we call some compilers transpilers even though literally everything is a compiler for something.