[orx-color] Add color transforms from OPENRNDR, add colorMatrix {}

This commit is contained in:
Edwin Jakobs
2025-02-26 18:01:36 +01:00
parent ef1b8a6493
commit 0046348410
15 changed files with 336 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ plugins {
dependencies {
implementation(libs.openrndr.application)
implementation(libs.openrndr.math)
implementation(project(":orx-color"))
implementation(project(":orx-noise"))
implementation(project(":orx-fx"))
implementation(libs.openrndr.filter)

View File

@@ -6,6 +6,7 @@ import org.openrndr.Program
import org.openrndr.ProgramImplementation
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
import org.openrndr.extra.color.colormatrix.tint
import org.openrndr.extra.noise.uniformRing
import org.openrndr.filter.color.delinearize
import org.openrndr.filter.color.linearize
@@ -78,12 +79,12 @@ class TemporalBlur : Extension {
/**
* should the accumulator linearize the input. this should be true when rendering in sRGB
*/
var linearizeInput = true
var linearizeInput = false
/**
* should the accumulator delinearize the output. this should be true when rendering in sRGB
*/
var delinearizeOutput = true
var delinearizeOutput = false
/**
* multisampling setting
@@ -262,7 +263,6 @@ class TemporalBlur : Extension {
drawer.isolatedWithTarget(result!!) {
drawer.drawStyle.blendMode = BlendMode.OVER
drawer.clear(ColorRGBa.BLACK)
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade((1.0 / samples) * gain))
drawer.image(accumulator!!.colorBuffer(0))