When attempting to expand OIT support for a Geometry Shader. The OIT logic requires a pixel shader to include an input item of SV_COVERAGE; however, this give a fxc compile error x4502 invalid input semantic 'SV_COVERAGE' when trying to compile the geometry shader. So DX geometry shaders do not support SV_COVERAGE? I could find very little on the net related to this problem. Any known work-arounds? I may need to avoid the geometry shader and only support OIT for this scene with a much larger vertex/index buffer, which is a shame. I was thinking the SV_COVERAGE is really only needed at the output of the GS but DX GS's requires a single inout parameter declaration. Any comments appreciated.
Asked
Active
Viewed 183 times
0
-
HI, I assume you have referred to this page -> https://learn.microsoft.com/en-us/windows/desktop/direct3dhlsl/dx-graphics-hlsl-semantics . I am assuming you want to set the SV_COVERAGE as part of the input into the PS. From what I can see, you set the coverage in the Blendstate if you want to set as input for PS, or you can set it actually in the PS. You are right though, information is a little light on. DICE has a code snippet in their presentation -> http://www.dice.se/wp-content/uploads/2014/12/GDC11_DX11inBF3_Public.pdf. GL – ErnieDingo Jan 28 '19 at 21:36
-
Yes, simply an input to the PS. Which won't compile the GS meaning I can't even get a build to happen with an SV_COVERAGE as part of a GS that feeds the PS. – Robert Jan 30 '19 at 11:40
-
I have a similar set up with GS input into my PS so I will be able to test SV_COVERAGE parameter into PS. I will have a play around with it tonight, and post the code back if I have coverage working (And compiling!). – ErnieDingo Jan 30 '19 at 21:53