Post Processing Shader
A PostProcessingShader is a shader that is applied to the screen after the scene is rendered. Post-processing shaders cannot be used to modify Traced Rays, but they can be used to modify all Ray Tracer buffers. Post-processing shaders have access to all pixels in every buffer at once, and can modify them in any way they want.
Creating a Post Processing Shader
Shader Shader.new(function shaderFunction , table attributes? )
Creates a new Post Processing Shader.
Properties
function Function
The function to call when the shader is applied.
Note
The shader function is expected to return nil or all buffers in a dictionary.
table Attributes
Optional user-defined attributes to pass to the shader.
Methods
dict Process(RayTracer rayTracer , ... )
Processes the shader.
Note
The shader function is expected to return nil or all buffers in a dictionary.
table<Vector2> GetAdjacentPixels(Vector2 pixel , Vector2 resolution , int radius )
Returns a list of adjacent pixel coordinates to
Note
The shape of the search area is always a square.
Vector3 Color3ToVector3(Color3 color )
Converts a Color3 to a Vector3 to make math operations easier.
Color3 Vector3ToColor3(Vector3 vector , boolean clamp? [=false] )
Converts a Vector3 to a Color3. If
Color3 NumberToColor3(number number )
Converts a number to a greyscale Color3.