Skip to content

ShaderPipeline

final class ShaderPipeline
Package: dev.joid.lib.shader.pipeline · Module: core · Source: ShaderPipeline.java

Draws something into an offscreen framebuffer, runs it through a chain of shader passes, and draws the result in place.

A node effect such as a blur or a rounded mask goes through it; call it yourself in a node layer or a custom node (Post-process with shader passes).

The area grows by the largest IShaderPass.expansion of the passes, and only its part visible on screen is rendered, at the resolution of the screen. Each pass reads the result of the previous one; the last pass draws on screen with premultiplied blending. The framebuffers come from FrameBufferPool, a pair per nesting depth, so a pipeline inside a pass gets its own.

ReturnsSignatureSummary
voidrender(double x, double y, double width, double height, Runnable baseDraw, IShaderPass… passes) staticRuns baseDraw into the area at x, y of width × height, in the coordinates you draw in, then applies passes in order.
voidrender(double x, double y, double width, double height, Runnable baseDraw, List passes) staticRuns baseDraw into the area at x, y of width × height, then applies the passes of the list in order, as the varargs form does.

void render(double x, double y, double width, double height, Runnable baseDraw, IShaderPass... passes) static

Runs baseDraw into the area at x, y of width × height, in the coordinates you draw in, then applies passes in order. Without passes, or with an area of no width or height, it runs baseDraw directly.

void render(double x, double y, double width, double height, Runnable baseDraw, List<IShaderPass> passes) static

Runs baseDraw into the area at x, y of width × height, then applies the passes of the list in order, as the varargs form does.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page