Add access to accumulation buffer in orx-compositor
This commit is contained in:
@@ -32,6 +32,7 @@ open class Layer internal constructor() {
|
|||||||
var blendFilter: Pair<Filter, Filter.() -> Unit>? = null
|
var blendFilter: Pair<Filter, Filter.() -> Unit>? = null
|
||||||
val postFilters: MutableList<Pair<Filter, Filter.() -> Unit>> = mutableListOf()
|
val postFilters: MutableList<Pair<Filter, Filter.() -> Unit>> = mutableListOf()
|
||||||
var colorType = ColorType.UINT8
|
var colorType = ColorType.UINT8
|
||||||
|
var accumulation: ColorBuffer? = null
|
||||||
|
|
||||||
@BooleanParameter("enabled")
|
@BooleanParameter("enabled")
|
||||||
var enabled = true
|
var enabled = true
|
||||||
@@ -48,6 +49,11 @@ open class Layer internal constructor() {
|
|||||||
|
|
||||||
val activeRenderTarget = RenderTarget.active
|
val activeRenderTarget = RenderTarget.active
|
||||||
|
|
||||||
|
accumulation = if (activeRenderTarget !is ProgramRenderTarget) {
|
||||||
|
activeRenderTarget.colorBuffer(0)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
|
||||||
val localLayerTarget = layerTarget
|
val localLayerTarget = layerTarget
|
||||||
if (localLayerTarget == null || (localLayerTarget.width != activeRenderTarget.width || localLayerTarget.height != activeRenderTarget.height)) {
|
if (localLayerTarget == null || (localLayerTarget.width != activeRenderTarget.width || localLayerTarget.height != activeRenderTarget.height)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user