Shader
Write your own GLSL and draw thousands of anything into the scene, lit like a part. Insert one and it starts as a field of grass.
A Shader draws InstanceCount copies of VertexCount vertices inside its box (CFrame and Size) with its VertexShader and FragmentShader, whose vertex stage places each vertex from gl_VertexID and gl_InstanceID. Each number, bool, Vector2, Vector3, Color3 or NumberRange attribute becomes a uniform of the same name, beside built-ins like uTime and uSize; glueShade lights a surface like a Part. Status shows "Compiled" or the first error. Traced adds its triangles to the path tracer in Rendered.
Properties
Transform
| Name | Type | Default | Description |
|---|---|---|---|
| CFrame | CFrame | With Size, the box the Shader draws inside. | |
| Orientation | Vector3 | The rotation half of CFrame, hidden from Properties. | |
| Position | Vector3 | The position half of CFrame, hidden from Properties. | |
| Size | Vector3 | 24, 2, 24 | With CFrame, the box the Shader draws inside. |
Shader
| Enabled | boolean | true | |
| FragmentShader | FragmentShader | The FragmentShader instance holding its GLSL, without a version line; it may live anywhere. | |
| InstanceCount | number | 40000 0 to 4e+06 | How many copies of VertexCount vertices it draws. |
| Primitive | string | "Triangles" Triangles, Lines, Points | |
| Status | string | Read-only: Compiled, or the first error; a Shader nothing has drawn yet reads Compiled. | |
| Traced | boolean | false | In Rendered, a Triangles Shader with Traced on goes into the path trace instead of over it. |
| VertexCount | number | 24 0 to 1e+06 | How many vertices each of the InstanceCount copies has. |
| VertexShader | VertexShader | The VertexShader instance holding its GLSL, without a version line; it may live anywhere. |
Scripts
| WorldCFrame | CFrame | scripts only |
