I am using Vulkan in Unity, and I assuming the custom shaders are compiled to SPIR-V as an intermediate step. How can I go about using the FragSizeEXT SPIR-V decorator in the Unity shader to access the rectangular pixel footprint of a fragment invocation. The following screenshot was taken from Vulkan specification which describes FragSizeEXT.
The following can be done in GLSL to access the FragSize
#version 450
#extension GL_EXT_fragment_invocation_density : enable
void main() {
ivec2 wh = gl_FragSizeEXT;
}
I was wondering if there is any similar way to access the FragSizeEXT in the default HLSL/Cg setup in Unity while working with Vulkan.
