예제 #1
0
파일: AoType.cs 프로젝트: windygu/actools
        public static Format GetFormat(this AoType type)
        {
            switch (type)
            {
            case AoType.Ssao:
            case AoType.SsaoAlt:
            case AoType.Hbao:
                return(Format.R8_UNorm);

            /*case AoType.Ssgi:
             *  return Format.R8G8B8A8_UNorm;*/
            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #2
0
파일: AoType.cs 프로젝트: windygu/actools
        public static AoHelperBase GetHelper(this AoType type, DeviceContextHolder holder)
        {
            switch (type)
            {
            case AoType.Ssao:
                return(holder.GetHelper <SsaoHelper>());

            case AoType.SsaoAlt:
                return(holder.GetHelper <SsaoAltHelper>());

            case AoType.Hbao:
                return(holder.GetHelper <HbaoHelper>());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #3
0
        protected override string GetInformationString()
        {
#if SSLR_PARAMETRIZED
            if (SslrAdjustCurrentMode != SslrAdjustMode.None)
            {
                return($@"Mode: {SslrAdjustCurrentMode}
Start from: {_sslrStartFrom}
Fix multiplier: {_sslrFixMultiplier}
Offset: {_sslrOffset}
Grow fix: {_sslrGrowFix}
Distance threshold: {_sslrDistanceThreshold}");
            }
#endif

            var aa = new[] {
                UseMsaa?MsaaSampleCount + "xMSAA" : null,
                UseSsaa ? $"{Math.Pow(ResolutionMultiplier, 2d).Round()}xSSAA{(TemporaryFlag ? " (exp.)" : "")}" : null,
                UseFxaa ? "FXAA" : null,
            }.NonNull().JoinToString(", ");

            var se = new[] {
                UseSslr ? "SSLR" : null,
                UseAo ? AoType.GetDescription() : null,
                UseBloom ? "Bloom" : null,
            }.NonNull().JoinToString(", ");

            var pp = new[] {
                ToneMapping != ToneMappingFn.None ? "Tone Mapping" : null,
                UseColorGrading&& ColorGradingData != null ? "Color Grading" : null
            }.NonNull().JoinToString(", ");

            if (ToneMapping != ToneMappingFn.None)
            {
                pp += $"\r\nTone Mapping Func.: {ToneMapping.GetDescription()}";
                pp += $"\r\nExp./Gamma/White P.: {ToneExposure:F2}, {ToneGamma:F2}, {ToneWhitePoint:F2}";
            }

            return(CarNode?.DebugString ?? $@"
FPS: {FramesPerSecond:F0}{(SyncInterval ? " (limited)" : "")} ({Width}×{Height})
Triangles: {CarNode?.TrianglesCount:D}
AA: {(string.IsNullOrEmpty(aa) ? "None" : aa)}
Shadows: {(EnableShadows ? $"{(UsePcss ? "Yes, PCSS" : "Yes")} ({ShadowMapSize})" : "No")}
Effects: {(string.IsNullOrEmpty(se) ? "None" : se)}
Color: {(string.IsNullOrWhiteSpace(pp) ? "Original" : pp)}".Trim());
        }
        protected override string GetInformationString()
        {
            var aa = new[] {
                UseMsaa?MsaaSampleCount + "xMSAA" : null,
                UseSsaa ? $"{Math.Pow(ResolutionMultiplier, 2d).Round()}xSSAA" : null,
                UseFxaa ? "FXAA" : null,
            }.NonNull().JoinToString(", ");

            var se = new[] {
                UseDof?UseAccumulationDof ? "Acc. DOF" : "DOF" : null,
                UseSslr ? "SSLR" : null,
                UseAo ? AoType.GetDescription() : null,
                UseBloom ? "HDR" : null,
            }.NonNull().JoinToString(", ");

            var pp = new[] {
                ToneMapping != ToneMappingFn.None ? "Tone Mapping" : null,
                UseColorGrading&& ColorGradingData != null ? "Color Grading" : null
            }.NonNull().JoinToString(", ");

            if (ToneMapping != ToneMappingFn.None)
            {
                pp += $"\r\nTone Mapping Func.: {ToneMapping.GetDescription()}";
                pp += $"\r\nExp./Gamma/White P.: {ToneExposure:F2}, {ToneGamma:F2}, {ToneWhitePoint:F2}";
            }

            return(CarNode?.DebugString ?? $@"
FPS: {FramesPerSecond:F0}{(SyncInterval ? " (limited)" : "")} ({Width}×{Height})
Triangles: {CarNode?.TrianglesCount:D}
AA: {(string.IsNullOrEmpty(aa) ? "None" : aa)}
Shadows: {(EnableShadows ? $"{(UsePcss ? "Yes, PCSS" : "Yes")} ({ShadowMapSize})" : "No")}
Effects: {(string.IsNullOrEmpty(se) ? "None" : se)}
Color: {(string.IsNullOrWhiteSpace(pp) ? "Original" : pp)}
Shaders set: {_darkMode}
Lights: {_lights.Count(x => x.ActuallyEnabled)} (shadows: {(EnableShadows ? 1 + _lights.Count(x => x.ActuallyEnabled && x.ShadowsActive) : 0)})
Skin editing: {(ImageUtils.IsMagickSupported ? MagickOverride ? "Magick.NET av., enabled" : "Magick.NET av., disabled" : "Magick.NET not available")}".Trim());
        }
예제 #5
0
파일: AoType.cs 프로젝트: windygu/actools
 public static bool IsScreenSpace(this AoType type)
 {
     return(type == AoType.Hbao);
 }
예제 #6
0
파일: AoType.cs 프로젝트: windygu/actools
 public static bool IsProductionReady(this AoType type)
 {
     return(type == AoType.Ssao || type == AoType.SsaoAlt || type == AoType.Hbao);
 }