> For the complete documentation index, see [llms.txt](https://docs.hology.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hology.app/shaders/shader-parameters.md).

# Shader parameters

Shader parameters are properties on the shader class that you can set in the editor for materials created using the shader. This allows you to customize the shader's appearance from the editor and reuse the code for different materials

Parameters can be created by adding the `@Parameter()` decorator on a property in your actor class. The type of the parameter will be inferred by your property's type annotation.

The example below shows all currently supported types.

```typescript
import { rgb, standardMaterial } from "@hology/core/shader-nodes";
import { NodeShader, NodeShaderOutput, Parameter } from "@hology/core/shader/shader";
import { Color, Vector2, Vector3, Color, Euler } from "three";

export class ExampleShader extends NodeShader {
    @Parameter() color: Color = new Color(0xff0000)
    @Parameter() aNumber: number
    @Parameter() aBoolen: boolean
    @Parameter() aString: string
    @Parameter() vec2: Vector2
    @Parameter() vec3: Vector3
    @Parameter() color: Color
    @Parameter() rotation: Euler

    output(): NodeShaderOutput {
        return {
            color: standardMaterial({color: rgb(this.color)})
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hology.app/shaders/shader-parameters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
