[orx-fx] Use the appropriate FilterNto1 interfaces

* Fix webgl 2 compatibility
 * Add LumaLaplacian, ACESTonemap, ReinhardTonemap, DirectionalHashBlur
This commit is contained in:
Edwin Jakobs
2022-12-28 13:57:27 +01:00
parent beb53bbde7
commit 750b5ef67e
87 changed files with 578 additions and 175 deletions

View File

@@ -36,7 +36,7 @@ class Post : Extension {
inner class IntermediateBuffers {
internal val buffers = mutableMapOf<Int, ColorBuffer>()
operator fun get(index: Int) : ColorBuffer {
operator fun get(index: Int): ColorBuffer {
return buffers.getOrPut(index) {
colorBuffer(output!!.width, output!!.height, output!!.contentScale, type = intermediateType)
}
@@ -63,6 +63,8 @@ class Post : Extension {
// in case the attributes of the existing buffers no longer match those of the active render target
if (lit.width != art.width || lit.height != art.height || lit.contentScale != art.contentScale || lit.multisample != art.multisample) {
lit.colorBuffer(0).destroy()
lit.depthBuffer?.destroy()
lit.detachDepthBuffer()
lit.detachColorAttachments()
lit.destroy()
inputTarget = null