コード例 #1
0
        public void SetShadingRate(TargetArea targetArea, ShadingRate rate)
        {
            if (foveatedRenderingInited)
            {
                var clampedRate = rate.Clamp(ShadingRate.CULL, ShadingRate.X1_PER_4X4_PIXELS);
                switch (targetArea)
                {
                case TargetArea.INNER:
                    innerShadingRate = clampedRate;
                    break;

                case TargetArea.MIDDLE:
                    middleShadingRate = clampedRate;
                    break;

                case TargetArea.PERIPHERAL:
                    peripheralShadingRate = clampedRate;
                    break;
                }

                ViveFoveatedRenderingAPI.SetShadingRate(targetArea, clampedRate);
                GL.IssuePluginEvent(ViveFoveatedRenderingAPI.GetRenderEventFunc(), (int)EventID.UPDATE_GAZE);
            }
        }
コード例 #2
0
 static extern public void SetShadingRate(TargetArea targetArea, ShadingRate rate);
コード例 #3
0
 private static extern void SetShadingRate(ShadingRate inner, ShadingRate middle, ShadingRate outer);