Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import UntoldEngine
struct AntiAliasingEditorView: View {
@ObservedObject var fxaaSettings = FXAAParams.shared
@ObservedObject var smaaSettings = SMAAParams.shared
private let taaSettings = TAAParams.shared
@State private var selectedMode = EditorAntiAliasingOption.currentEngineMode()
@State private var showAdvanced = false

Expand Down Expand Up @@ -117,6 +118,36 @@ struct AntiAliasingEditorView: View {
}
case .msaa:
EmptyView()
case .taa, .msaaTaa:
DisclosureGroup("Advanced", isExpanded: $showAdvanced) {
VStack(alignment: .leading, spacing: 8) {
UndoableEffectSlider(
label: "History Weight",
undoName: "Change TAA History Weight",
range: 0.5 ... 0.98,
help: "How much of the previous frames the resolve keeps. Higher smooths more and settles slower; lower follows motion sooner.",
get: { taaSettings.historyWeight },
set: { taaSettings.historyWeight = $0 }
)
UndoableEffectSlider(
label: "Clip Gamma",
undoName: "Change TAA Clip Gamma",
range: 0.5 ... 3.0,
help: "How far the history may stray from the frame's neighbourhood before it is clipped. Lower rejects ghosts sooner; higher keeps more of the history on thin detail.",
get: { taaSettings.clipGamma },
set: { taaSettings.clipGamma = $0 }
)
UndoableEffectSlider(
label: "Jitter Scale",
undoName: "Change TAA Jitter Scale",
range: 0.0 ... 1.0,
help: "The sub-pixel offset of the projection each frame, as a share of the full sequence. 0 turns the jitter off and leaves the resolve's blend alone.",
get: { taaSettings.jitterScale },
set: { taaSettings.jitterScale = $0 }
)
}
.padding(.top, 4)
}
}
}
.padding(.vertical, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ enum EditorAntiAliasingOption: String, CaseIterable, Hashable, Identifiable {
case fxaa = "FXAA"
case smaa = "SMAA"
case msaa = "MSAA"
/// Temporal: the projection jittered each frame and the frame blended with its history.
case taa = "TAA"
/// 4× MSAA on the geometry with the temporal resolve on top.
case msaaTaa = "MSAA+TAA"

var id: String {
rawValue
Expand All @@ -34,6 +38,10 @@ enum EditorAntiAliasingOption: String, CaseIterable, Hashable, Identifiable {
return .smaa
case .msaa:
return .msaa
case .taa:
return .taa
case .msaaTaa:
return .msaaTaa
}
}

Expand All @@ -47,6 +55,10 @@ enum EditorAntiAliasingOption: String, CaseIterable, Hashable, Identifiable {
return .smaa
case .msaa:
return .msaa
case .taa:
return .taa
case .msaaTaa:
return .msaaTaa
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import UntoldEngine
enum EditorTonemapOption: String, CaseIterable, Hashable, Identifiable {
case agx = "AgX"
case aces = "ACES"
/// No curve: the scene's linear colour as it is, for a mixed-immersion space where the
/// passthrough sets the display's response.
case none = "None"

var id: String {
rawValue
Expand All @@ -28,6 +31,8 @@ enum EditorTonemapOption: String, CaseIterable, Hashable, Identifiable {
return .agx
case .aces:
return .aces
case .none:
return .none
}
}

Expand All @@ -37,6 +42,8 @@ enum EditorTonemapOption: String, CaseIterable, Hashable, Identifiable {
return .agx
case .aces:
return .aces
case .none:
return .none
}
}
}
Loading