More specific version number: UE 4.27
Recently I got a special application that needs to use shader specified stencil reference value.
Despite the environment is correct (D3D12 + ForceDXC when implementing a shader class),
it fails to compile with SV_StencilRef.
So I wish to know if it’s supported? Or I might figure out other solution ATM.
Okay, I just figured this out myself.
After testing with D3D12 sample code, I’m sure NVIDIA GPU doesn’t support this feature.
When I call CheckFeatureSupport(), PSSpecifiedStencilRefSupported is always set to false with NVIDIA GPU.
Surprisingly, it’s supported by intel graphic card. (But who plays game on intel graphic lol)
I guess AMD GPU might support it, but I don’t have one to test.
Anyway, if you try to use SV_StencilRef on NVIDIA GPU, just give it up.