Class View.DepthOfFieldOptions

  • Enclosing class:
    View

    public static class View.DepthOfFieldOptions
    extends java.lang.Object
    Options to control Depth of Field (DoF) effect in the scene. cocScale can be used to set the depth of field blur independently from the camera aperture, e.g. for artistic reasons. This can be achieved by setting: cocScale = cameraAperture / desiredDoFAperture
    See Also:
    Camera
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cocScale

        public float cocScale
        circle of confusion scale factor (amount of blur)
      • maxApertureDiameter

        public float maxApertureDiameter
        maximum aperture diameter in meters (zero to disable rotation)
      • enabled

        public boolean enabled
        enable or disable depth of field effect
      • nativeResolution

        public boolean nativeResolution
        perform DoF processing at native resolution
      • foregroundRingCount

        public int foregroundRingCount
        Number of of rings used by the gather kernels. The number of rings affects quality and performance. The actual number of sample per pixel is defined as (ringCount * 2 - 1)^2. Here are a few commonly used values: 3 rings : 25 ( 5x 5 grid) 4 rings : 49 ( 7x 7 grid) 5 rings : 81 ( 9x 9 grid) 17 rings : 1089 (33x33 grid) With a maximum circle-of-confusion of 32, it is never necessary to use more than 17 rings. Usually all three settings below are set to the same value, however, it is often acceptable to use a lower ring count for the "fast tiles", which improves performance. Fast tiles are regions of the screen where every pixels have a similar circle-of-confusion radius. A value of 0 means default, which is 5 on desktop and 3 on mobile.
      • backgroundRingCount

        public int backgroundRingCount
        number of kernel rings for background tiles
      • fastGatherRingCount

        public int fastGatherRingCount
        number of kernel rings for fast tiles
      • maxForegroundCOC

        public int maxForegroundCOC
        maximum circle-of-confusion in pixels for the foreground, must be in [0, 32] range. A value of 0 means default, which is 32 on desktop and 24 on mobile.
      • maxBackgroundCOC

        public int maxBackgroundCOC
        maximum circle-of-confusion in pixels for the background, must be in [0, 32] range. A value of 0 means default, which is 32 on desktop and 24 on mobile.
    • Constructor Detail

      • DepthOfFieldOptions

        public DepthOfFieldOptions()