// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) #pragma kernel CreateFoveatedShadingRateTexture #pragma only_renderers d3d11 vulkan #include "Internal-CreateFoveatedShadingRateTexture.cginc" RWTexture2D _Result; // 1 thread for z because we run both eyes and then combine them with a min operator [numthreads(8,8,1)] void CreateFoveatedShadingRateTexture(uint3 id : SV_DispatchThreadID) { uint leftShadingRateLevel = GetShadingRateLevel(uint3(id.xy, kLeftEyeId)); uint rightShadingRateLevel = GetShadingRateLevel(uint3(id.xy, kRightEyeId)); _Result[uint2(id.x, id.y)] = min(rightShadingRateLevel, leftShadingRateLevel); }