diff --git a/Sources/DemoGame/main.swift b/Sources/DemoGame/main.swift
index 4ceef8e2..03e6666f 100644
--- a/Sources/DemoGame/main.swift
+++ b/Sources/DemoGame/main.swift
@@ -165,9 +165,8 @@
bypassPostProcessing = true
// Disable SSAO
- SSAOParams.shared.enabled = false
- // Test Fast quality (8 samples, half-res)
- SSAOParams.shared.quality = .high
+ SSAO.setEnabled(false)
+ SSAO.setQuality(.high)
}
// Build the same demo scene procedurally.
diff --git a/Sources/UntoldEngine/Utils/PostFX.swift b/Sources/UntoldEngine/Utils/PostFX.swift
new file mode 100644
index 00000000..8d044bd7
--- /dev/null
+++ b/Sources/UntoldEngine/Utils/PostFX.swift
@@ -0,0 +1,88 @@
+//
+// PostFX.swift
+// UntoldEngine
+//
+// Copyright (C) Untold Engine Studios
+// Licensed under the GNU LGPL v3.0 or later.
+// See the LICENSE file or for details.
+//
+
+import Foundation
+
+public enum PostFXEffect: CaseIterable {
+ case colorGrading
+ case colorCorrection
+ case bloomThreshold
+ case bloomComposite
+ case vignette
+ case chromaticAberration
+ case depthOfField
+}
+
+public enum PostFX {
+ public static func setEnabled(_ effect: PostFXEffect, _ isEnabled: Bool) {
+ switch effect {
+ case .colorGrading:
+ ColorGradingParams.shared.enabled = isEnabled
+ case .colorCorrection:
+ ColorCorrectionParams.shared.enabled = isEnabled
+ case .bloomThreshold:
+ BloomThresholdParams.shared.enabled = isEnabled
+ case .bloomComposite:
+ BloomCompositeParams.shared.enabled = isEnabled
+ case .vignette:
+ VignetteParams.shared.enabled = isEnabled
+ case .chromaticAberration:
+ ChromaticAberrationParams.shared.enabled = isEnabled
+ case .depthOfField:
+ DepthOfFieldParams.shared.enabled = isEnabled
+ }
+ }
+
+ public static func isEnabled(_ effect: PostFXEffect) -> Bool {
+ switch effect {
+ case .colorGrading:
+ return ColorGradingParams.shared.enabled
+ case .colorCorrection:
+ return ColorCorrectionParams.shared.enabled
+ case .bloomThreshold:
+ return BloomThresholdParams.shared.enabled
+ case .bloomComposite:
+ return BloomCompositeParams.shared.enabled
+ case .vignette:
+ return VignetteParams.shared.enabled
+ case .chromaticAberration:
+ return ChromaticAberrationParams.shared.enabled
+ case .depthOfField:
+ return DepthOfFieldParams.shared.enabled
+ }
+ }
+
+ public static func enableColorGrading(_ isEnabled: Bool) {
+ setEnabled(.colorGrading, isEnabled)
+ }
+
+ public static func enableColorCorrection(_ isEnabled: Bool) {
+ setEnabled(.colorCorrection, isEnabled)
+ }
+
+ public static func enableBloomThreshold(_ isEnabled: Bool) {
+ setEnabled(.bloomThreshold, isEnabled)
+ }
+
+ public static func enableBloomComposite(_ isEnabled: Bool) {
+ setEnabled(.bloomComposite, isEnabled)
+ }
+
+ public static func enableVignette(_ isEnabled: Bool) {
+ setEnabled(.vignette, isEnabled)
+ }
+
+ public static func enableChromaticAberration(_ isEnabled: Bool) {
+ setEnabled(.chromaticAberration, isEnabled)
+ }
+
+ public static func enableDepthOfField(_ isEnabled: Bool) {
+ setEnabled(.depthOfField, isEnabled)
+ }
+}
diff --git a/Sources/UntoldEngine/Utils/SSAO.swift b/Sources/UntoldEngine/Utils/SSAO.swift
new file mode 100644
index 00000000..a292f6b0
--- /dev/null
+++ b/Sources/UntoldEngine/Utils/SSAO.swift
@@ -0,0 +1,52 @@
+//
+// SSAO.swift
+// UntoldEngine
+//
+// Copyright (C) Untold Engine Studios
+// Licensed under the GNU LGPL v3.0 or later.
+// See the LICENSE file or for details.
+//
+
+import Foundation
+
+public enum SSAO {
+ public static func setEnabled(_ isEnabled: Bool) {
+ SSAOParams.shared.enabled = isEnabled
+ }
+
+ public static func isEnabled() -> Bool {
+ SSAOParams.shared.enabled
+ }
+
+ public static func setQuality(_ quality: SSAOQuality) {
+ SSAOParams.shared.quality = quality
+ }
+
+ public static func getQuality() -> SSAOQuality {
+ SSAOParams.shared.quality
+ }
+
+ public static func setRadius(_ radius: Float) {
+ SSAOParams.shared.radius = radius
+ }
+
+ public static func getRadius() -> Float {
+ SSAOParams.shared.radius
+ }
+
+ public static func setBias(_ bias: Float) {
+ SSAOParams.shared.bias = bias
+ }
+
+ public static func getBias() -> Float {
+ SSAOParams.shared.bias
+ }
+
+ public static func setIntensity(_ intensity: Float) {
+ SSAOParams.shared.intensity = intensity
+ }
+
+ public static func getIntensity() -> Float {
+ SSAOParams.shared.intensity
+ }
+}
diff --git a/docs/06-Reference/02-EngineAPI.md b/docs/06-Reference/02-EngineAPI.md
index 4baa6bf8..0d649d55 100644
--- a/docs/06-Reference/02-EngineAPI.md
+++ b/docs/06-Reference/02-EngineAPI.md
@@ -223,6 +223,28 @@ let panel = createEntity()
createAreaLight(entityId: panel)
```
+### Enable or Disable PostFX
+
+Toggle post-processing effects globally through the PostFX facade:
+
+```swift
+PostFX.setEnabled(.colorGrading, false)
+
+PostFX.enableVignette(false)
+```
+
+### SSAO Controls
+
+SSAO is managed through a dedicated API because it affects render quality and pipelines:
+
+```swift
+SSAO.setEnabled(true)
+SSAO.setQuality(.high)
+SSAO.setRadius(0.8)
+SSAO.setBias(0.02)
+SSAO.setIntensity(1.2)
+```
+
---
# Animation
@@ -384,4 +406,3 @@ All custom systems must be registered during initialization so the engine knows
```swift
registerCustomSystem(dribblingSystemUpdate)
```
-