Package com.google.android.filament
Class View.AmbientOcclusionOptions
- java.lang.Object
-
- com.google.android.filament.View.AmbientOcclusionOptions
-
- Enclosing class:
- View
public static class View.AmbientOcclusionOptions extends java.lang.ObjectOptions for screen space Ambient Occlusion
-
-
Field Summary
Fields Modifier and Type Field Description booleanbentNormalsenables bent normals computation from AO, and specular AOfloatbiasSelf-occlusion bias in meters.floatbilateralThresholdDepth distance that constitute an edge for filtering.booleanenabledenable or disable screen space ambient occlusionfloatintensityStrength of the Ambient Occlusion effect.View.QualityLevellowPassFilterThe lowPassFilter setting controls the quality of the low pass filter applied to AO estimation.floatminHorizonAngleRadMinimal angle to consider in radian.floatpowerControls ambient occlusion's contrast.View.QualityLevelqualityThe quality setting controls the number of samples used for evaluating Ambient occlusion.floatradiusAmbient Occlusion radius in meters, between 0 and ~10.floatresolutionHow each dimension of the AO buffer is scaled.floatssctContactDistanceMaxMaximum contact distance with the cone.floatssctDepthBiasDepth bias in world units (mitigate self shadowing)floatssctDepthSlopeBiasDepth slope bias (mitigate self shadowing)booleanssctEnabledEnables or disables SSCT.floatssctIntensityIntensity of the shadows.floatssctLightConeRadFull cone angle in radian, between 0 and pi/2.float[]ssctLightDirectionLight direction.intssctRayCountNumbers of rays to trace, between 1 and 255.intssctSampleCountTracing sample count, between 1 and 255.floatssctStartTraceDistanceDistance from where tracing starts.View.QualityLevelupsamplingThe upsampling setting controls the quality of the ambient occlusion buffer upsampling.
-
Constructor Summary
Constructors Constructor Description AmbientOcclusionOptions()
-
-
-
Field Detail
-
radius
public float radius
Ambient Occlusion radius in meters, between 0 and ~10.
-
bias
public float bias
Self-occlusion bias in meters. Use to avoid self-occlusion. Between 0 and a few mm.
-
power
public float power
Controls ambient occlusion's contrast. Must be positive. Default is 1. Good values are between 0.5 and 3.
-
resolution
public float resolution
How each dimension of the AO buffer is scaled. Must be either 0.5 or 1.0.
-
intensity
public float intensity
Strength of the Ambient Occlusion effect. Must be positive.
-
bilateralThreshold
public float bilateralThreshold
Depth distance that constitute an edge for filtering. Must be positive. Default is 5cm. This must be adjusted with the scene's scale and/or units. A value too low will result in high frequency noise, while a value too high will result in the loss of geometry edges. For AO, it is generally better to be too blurry than not enough.
-
quality
@NonNull public View.QualityLevel quality
The quality setting controls the number of samples used for evaluating Ambient occlusion. The default is QualityLevel.LOW which is sufficient for most mobile applications.
-
lowPassFilter
@NonNull public View.QualityLevel lowPassFilter
The lowPassFilter setting controls the quality of the low pass filter applied to AO estimation. The default is QualityLevel.MEDIUM which is sufficient for most mobile applications. QualityLevel.LOW disables the filter entirely.
-
upsampling
@NonNull public View.QualityLevel upsampling
The upsampling setting controls the quality of the ambient occlusion buffer upsampling. The default is QualityLevel.LOW and uses bilinear filtering, a value of QualityLevel.HIGH or more enables a better bilateral filter.
-
enabled
public boolean enabled
enable or disable screen space ambient occlusion
-
bentNormals
public boolean bentNormals
enables bent normals computation from AO, and specular AO
-
minHorizonAngleRad
public float minHorizonAngleRad
Minimal angle to consider in radian. This is used to reduce the creases that can appear due to insufficiently tessellated geometry. For e.g. a good values to try could be around 0.2.
-
ssctLightConeRad
public float ssctLightConeRad
Full cone angle in radian, between 0 and pi/2. This affects the softness of the shadows, as well as how far they are cast. A smaller angle yields to sharper and shorter shadows. The default angle is about 60 degrees.
-
ssctStartTraceDistance
public float ssctStartTraceDistance
Distance from where tracing starts. This affects how far shadows are cast.
-
ssctContactDistanceMax
public float ssctContactDistanceMax
Maximum contact distance with the cone. Intersections between the traced cone and geometry samller than this distance are ignored.
-
ssctIntensity
public float ssctIntensity
Intensity of the shadows.
-
ssctLightDirection
@NonNull @Size(min=3L) public float[] ssctLightDirection
Light direction.
-
ssctDepthBias
public float ssctDepthBias
Depth bias in world units (mitigate self shadowing)
-
ssctDepthSlopeBias
public float ssctDepthSlopeBias
Depth slope bias (mitigate self shadowing)
-
ssctSampleCount
public int ssctSampleCount
Tracing sample count, between 1 and 255. This affects the quality as well as the distance of the shadows.
-
ssctRayCount
public int ssctRayCount
Numbers of rays to trace, between 1 and 255. This affects the noise of the shadows. Performance degrades quickly with this value.
-
ssctEnabled
public boolean ssctEnabled
Enables or disables SSCT.
-
-