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.
-
Näytä tämä ketju
-
Vastauksena käyttäjälle @tloch14
I *had* been doing this forever, but I've noticed that more and more, I'm decoupling geometry from shading and don't recommend this practice anymore. Especially as mesh-shaders come in, I think the two phases are separable and should be "mix-and-matched" more easily
2 vastausta 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @m_ninepoints ja @tloch14
To the point about shared data/ubos, I instead use common headers that define data structures/helpers that are included from compatible vertex/mesh and pixel shaders
1 vastaus 0 uudelleentwiittausta 0 tykkäystä
Interesting! I prefer common headers for data structures and UBOs as well, along with any heavy lifting functions. Effectively, the actual shader file becomes a technique. Basically “mix n matching” in the shader file.
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.