Scratch for Java

Shaders::add()

Adds a shader. If a shader with the given name already exists, that one is returned instead.

Syntax

Java

.add(name, fragmentShaderPath, vertexShaderPath)

Parameters

Name Data Type Description
name String a unique name
fragmentShaderPath String the path to the fragment shader
vertexShaderPath String the path to the vertex shader, may be null

Return

Shader

add()

Create Shareable URL

Select Sections