Quick answer: Shaders that fail on some hardware, failing to compile, producing artifacts, or rendering incorrectly, use capabilities (features, precision, a shader model/instruction set) that the affected GPUs don't support. Capture device context to find which hardware fails, then provide fallback shader variants that use widely-supported features, detect support and select an appropriate variant, and stay within the shader capabilities your target hardware actually has.
Shaders are GPU programs, and not all GPUs support the same shader capabilities, so a shader that compiles and runs correctly on your hardware can fail on others, failing to compile, rendering wrong, or causing artifacts. Since shader support varies across the GPUs in the wild, fixing shader failures means finding the affected hardware and providing fallbacks within supported capabilities.
Why Shaders Fail on Some Hardware
GPUs differ in their shader capabilities, supported shader models/versions, available features and instructions, precision support, and limits, so a shader can fail on hardware that lacks what it uses. Causes: unsupported features/instructions, the shader uses a feature, function, or instruction the GPU doesn't support, so it fails to compile or runs incorrectly. Shader model/version mismatch, the shader targets a higher shader model than the GPU supports. Precision issues, the shader assumes a precision the hardware handles differently (especially on mobile GPUs with limited precision), causing artifacts. And limits exceeded, the shader exceeds the GPU's limits (instruction count, texture samplers, etc.).
The pattern, works on most GPUs, fails on specific ones, means the shader relies on capabilities those GPUs lack. Mobile and older/integrated GPUs are common failure points because they support fewer/lower shader capabilities than a modern desktop GPU.
How to Diagnose It
Capture which GPUs the shaders fail on, the affected hardware shares a capability gap. With device context (GPU, driver), see whether failures concentrate on a vendor, mobile GPUs, older/integrated GPUs, or a capability level. The nature of the failure helps: compile failures point at unsupported features/shader model; artifacts point at precision or behavior differences. Check what shader features/model/precision the failing shaders use against what the affected hardware supports.
Bugnet captures device context with reports, so shader-failure reports (broken rendering, missing effects, artifacts) arrive correlated with the GPUs they affect, identifying the hardware whose capabilities you've exceeded, even for GPUs you don't own. Shader compilation can also be checked across target hardware/APIs ahead of time. The GPU correlation tells you which capability level to provide a fallback for.
How to Fix It
Provide fallback shader variants within supported capabilities. Create simpler variants, provide alternate shaders that use widely-supported features and a lower shader model for hardware that can't run the advanced version, so those GPUs get a simpler-but-working shader instead of a failure. Detect support and select a variant, query the GPU's capabilities and choose the appropriate shader variant for it (advanced where supported, fallback where not). Handle precision properly, especially for mobile, use precision the hardware supports and don't assume desktop precision. Stay within limits, keep shaders within the instruction/sampler limits of your target hardware, or provide reduced variants that do.
The principle is to not assume all GPUs support your most advanced shaders, target a supported baseline with fallbacks, and use advanced features only where detected. After fixing, verify shaders compile and render correctly on the previously-failing hardware (or via field data, that shader-failure reports stop). Robust shader handling, fallback variants, capability detection, and staying within target-hardware limits, is what makes rendering work across the range of GPUs and shader capabilities players have.
Shaders fail on hardware that lacks the features, precision, or shader model they use. Capture the affected GPUs, then provide simpler fallback variants and detect support to pick the right one.