fieldExpr
beta
filter
fieldExpr
RayTK
v0.42
Modifies field values using a custom expression.
The Expression parameter’s menu contains common examples.
Writing expressions:
- To access a value from input 1, use a function call like
inputOp1(p, ctx)- The
ppart is the spatial coordinate, so you can modify it with something likeinputOp1(p + vec3(1, 0, 0), ctx), which would move that field to the left. - The
ctxpart is required as the second argument to the function.
- The
- Other inputs are available as
inputOp2(...)etc - The two slider parameters are available as
THIS_Param1andTHIS_Param2 - The two vector parameters are available as
THIS_Vecparam1andTHIS_Vecparam2- To get at an individual part of one of the vector params, you can use
THIS_Vecparam1.y
- To get at an individual part of one of the vector params, you can use
Parameters
| Name | Description | Regular Handling | Read-Only Handling |
|---|---|---|---|
Enable | |||
Expression | |||
| |||
Param 1 | Runtime | Baked | |
Param 2 | Runtime | Baked | |
Vector Param 1 | Runtime | Baked | |
Vector Param 2 | Runtime | Baked | |
Coord Type | |||
| |||
Return Type | |||
| |||
Context Type | |||
| |||
Inputs
-
Input Field 1: (optional)- Coordinate Types:
floatvec2vec3vec4 - Context Types:
ContextMaterialContextCameraContextLightContextRayContextParticleContextVertexContextPixelContext - Return Types:
floatvec4SdfVolumeRayLightParticle
- Coordinate Types:
-
Input Field 2: (optional)- Coordinate Types:
floatvec2vec3vec4 - Context Types:
ContextMaterialContextCameraContextLightContextRayContextParticleContextVertexContextPixelContext - Return Types:
floatvec4SdfVolumeRayLightParticle
- Coordinate Types:
-
Input Field 3: (optional)- Coordinate Types:
floatvec2vec3vec4 - Context Types:
ContextMaterialContextCameraContextLightContextRayContextParticleContextVertexContextPixelContext - Return Types:
floatvec4SdfVolumeRayLightParticle
- Coordinate Types:
-
Input Field 4: (optional)- Coordinate Types:
floatvec2vec3vec4 - Context Types:
ContextMaterialContextCameraContextLightContextRayContextParticleContextVertexContextPixelContext - Return Types:
floatvec4SdfVolumeRayLightParticle
- Coordinate Types: