-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fragment shader should be optional in SDL_gpu graphics pipeline #12311
Comments
Will have to check but PS4/5 may require a fragment shader at all times, someone should be able to confirm sooner rather than later. Other than that it'd be good to have this in SDL_gpu_examples first so we can verify the fix everywhere. At the moment the GPU team is focused on PS5 but we can review patches for this if it turns out it's portable to allow null fragment shaders. |
It (probably) wouldn't be unreasonable to have the GPU API use a dummy fragment shader on those platforms, compiled down to a const static array inside SDL. |
The funny thing is PS is the one place where that may not be true; shader linkage is a lot more strict so it may be a situation where the shader itself is empty but still has inputs that match the vertex shader output, even though they're entirely unused... hoping to have a definitive answer on it soon. |
Got confirmation that this is possible on PS5, so PRs welcome for this feature! |
Amazing 🎉 I’ll see if I can get it to work for the PC APIs. |
When you want to render only depth, there’s no need for a fragment shader. Direct3D 12, Metal, and Vulkan all support omitting the fragment shader in a graphics pipeline. But SDL_gpu artificially requires one, requiring the programmer to compile and supply no-op fragment shaders.
The text was updated successfully, but these errors were encountered: