Any graphics engineers out there who structure their pixel and vertex shaders together? Because the two have to link together, I find it's easier to write 1 file with two entry points (ie, vs_main(), fs_main()) and then your UBOs and resources always match.
What holds me up here is explicit bindings. Sure, vertex shader may rarely, if ever, use the same buffers/textures as the fragment shader, but they still have to agree on binding. No overlapping, for instance. If spread across files, how do they all agree?
-
-
Are you using GLSL, HLSL, or a custom dialect of sorts? I think the solution sort of depends.
-
Well... At the moment glsl. I've tended toward this design in hlsl as well. At a previous job, this sort of thing was more or less strictly enforced by a technique-like wrapper language. I'm interested in what makes a difference. Literally trying to sponge knowledge rn.
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.