Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[orx-compositor] BufferMultisample in Layer #236

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

Vechro
Copy link
Contributor

@Vechro Vechro commented May 16, 2022

Continuation of Yvee1's work in #204 to address #178.

I need more test cases to verify it works for all cases but it seems to handle the basic composite layers fine.

Also makes layers contentScale aware.

Comment on lines +219 to +220
activeRenderTargetColorBuffer?.destroy()
activeRenderTargetColorBuffer = colorBuffer(activeRenderTarget.width, activeRenderTarget.height,
activeRenderTarget.contentScale, type = colorType)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually know what "active" rendertarget means or if there's any semantics associated with it. I'm assuming it can change dimensions so I'm recreating it here if it does so.

@@ -43,7 +43,8 @@ open class Layer internal constructor() {
var blendFilter: Pair<Filter, Filter.() -> Unit>? = null
val postFilters: MutableList<Pair<Filter, Filter.() -> Unit>> = mutableListOf()
var colorType = ColorType.UINT8
var accumulation: ColorBuffer? = null
private var resolvedColorBuffer: ColorBuffer? = null
private var activeRenderTargetColorBuffer: ColorBuffer? = null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a lateinit I suppose, I don't know which option is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants