Scratch for Java

Shaders()

This class works in a project you run on your own computer, but not in the examples you can start here in the browser. There is no file system, no video encoder and no OpenGL behind a web page, so calling it there tells you as much and does nothing.

The shaders belonging to one sprite or stage, and which of them is currently drawn with.

Reached through getShaders(), so that shader handling does not take up room in the everyday API of a sprite:

this.getShaders().add("blur", "blur.frag", null);
 this.getShaders().switchTo("blur");

Syntax

Java

new Shaders(owner)
new Shaders(s)
Shaders()

Create Shareable URL

Select Sections