[orx-color, orx-fx] turbo_colormap and spectral_zucconi6 provided as shader phrases (#338)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.Filter1to1
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@@ -2,14 +2,25 @@
|
||||
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.extra.color.colormaps.ColormapPhraseBook
|
||||
import org.openrndr.extra.fx.fx_spectral_zucconi_colormap
|
||||
import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.shaderphrases.preprocess
|
||||
|
||||
/**
|
||||
* Maps values of the RED color channel to natural light dispersion spectrum as described
|
||||
* by Alan Zucconi in the
|
||||
* [Improving the Rainbow](https://www.alanzucconi.com/2017/07/15/improving-the-rainbow/)
|
||||
* article.
|
||||
*
|
||||
* @see ColormapPhraseBook.spectralZucconi6
|
||||
* @see org.openrndr.extra.color.colormaps.spectralZucconi6
|
||||
*/
|
||||
@Description("spectral colormap")
|
||||
class SpectralZucconiColormap : ColormapFilter(fx_spectral_zucconi_colormap, "spectral-zucconi-colormap")
|
||||
class SpectralZucconiColormap : ColormapFilter(
|
||||
code = run {
|
||||
ColormapPhraseBook.register()
|
||||
fx_spectral_zucconi_colormap.preprocess()
|
||||
},
|
||||
name = "spectral-zucconi-colormap"
|
||||
)
|
||||
|
||||
@@ -2,13 +2,24 @@
|
||||
|
||||
package org.openrndr.extra.fx.colormap
|
||||
|
||||
import org.openrndr.extra.color.colormaps.ColormapPhraseBook
|
||||
import org.openrndr.extra.fx.fx_turbo_colormap
|
||||
import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.shaderphrases.preprocess
|
||||
|
||||
/**
|
||||
* Maps values of the RED color channel to Turbo Colormap according to
|
||||
* [Turbo, An Improved Rainbow Colormap for Visualization](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)
|
||||
* by Google.
|
||||
*
|
||||
* @see ColormapPhraseBook.spectralZucconi6
|
||||
* @see org.openrndr.extra.color.colormaps.spectralZucconi6
|
||||
*/
|
||||
@Description("turbo colormap")
|
||||
open class TurboColormap : ColormapFilter(fx_turbo_colormap, "turbo-colormap")
|
||||
class TurboColormap : ColormapFilter(
|
||||
code = run {
|
||||
ColormapPhraseBook.register()
|
||||
fx_turbo_colormap.preprocess()
|
||||
},
|
||||
name = "turbo-colormap"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user