Skip to content

Commit

Permalink
Changed Filament View default configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGorisse committed Nov 24, 2023
1 parent f27e267 commit 6448148
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions sceneview/src/main/java/io/github/sceneview/SceneView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -872,13 +872,26 @@ open class SceneView @JvmOverloads constructor(

fun createView(engine: Engine) =
engine.createView().apply {
// On mobile, better use lower quality color buffer
renderQuality = renderQuality.apply {
hdrColorBuffer = QualityLevel.MEDIUM
}
// Dynamic resolution often helps a lot
dynamicResolutionOptions = dynamicResolutionOptions.apply {
// Disabled cause generating some camera stream wrong scaling ratio
enabled = true
homogeneousScaling = true
quality = QualityLevel.MEDIUM
}

// MSAA is needed with dynamic resolution MEDIUM
multiSampleAntiAliasingOptions = multiSampleAntiAliasingOptions.apply {
enabled = false
quality = QualityLevel.HIGH
}

// FXAA is pretty cheap and helps a lot
antiAliasing = AntiAliasing.NONE
// ambient occlusion is the cheapest effect that adds a lot of quality
antiAliasing = AntiAliasing.FXAA
// Ambient occlusion is the cheapest effect that adds a lot of quality
ambientOcclusionOptions = ambientOcclusionOptions.apply {
enabled = true
}
Expand Down

0 comments on commit 6448148

Please sign in to comment.