# glslSDF()

# Example


Example 2 (click to open)

Example 3

# Description

Generates an primitive from the provided GLSL function. The provided GLSL function must return a float(the distance filed) and the first parameter must be a vec3(position).

This will not work with GL ES3.

# Syntax

glslSDF(glslCode);

# Parameters

glslCode String: The glsl source code.

# Returns

Function: A js function of the glslCode. Any arguments given to this function will be forwarded as arguments to the provided glsl function.