You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
506 B

#ifndef VRS_IMAGE_INCLUDED
#define VRS_IMAGE_INCLUDED
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
RW_TEXTURE2D(uint, _ShadingRateImage);
uniform float4 _VrsScaleBias;
void ImageStore(uint shadingRateNativeValue, uint2 gid)
{
#if !defined(APPLY_Y_FLIP)
// compute shader introduce a natural y-flip
// hence the reverse test
gid.y = _VrsScaleBias.w - 1 - gid.y;
#endif
_ShadingRateImage[gid] = shadingRateNativeValue;
}
#endif // VRS_IMAGE_INCLUDED