diff --git a/devel/prototypes/edgeDist.png b/devel/prototypes/edgeDist.png new file mode 100644 index 000000000..960390d33 Binary files /dev/null and b/devel/prototypes/edgeDist.png differ diff --git a/devel/prototypes/edgeDist.tox b/devel/prototypes/edgeDist.tox new file mode 100644 index 000000000..9ff7cdc31 Binary files /dev/null and b/devel/prototypes/edgeDist.tox differ diff --git a/devel/prototypes/hexRepeat.glsl b/devel/prototypes/hexRepeat.glsl new file mode 100644 index 000000000..255da2f41 --- /dev/null +++ b/devel/prototypes/hexRepeat.glsl @@ -0,0 +1,30 @@ +// @Radius {"default":0.3, "normMin":0, "normMax":1} +// @Halfspacing {"default":0.3, "normMin":0, "normMax":1} +// @Cornerradius {"default":0.3, "normMin":0, "normMax":1} + +vec2 hexagon(vec2 position, float radius, float halfSpacing, float cornerRadius) { + vec2 s = vec2(sqrt(3.0), 3.0) * (radius + halfSpacing * 2.0 / sqrt(3.0)); + position /= s; + vec2 d1 = (fract(position) - 0.5) * s; + vec2 d2 = (fract(position + 0.5) - 0.5) * s; + position = dot(d1, d1) < dot(d2, d2) ? d1 : d2; + position = abs(position); + position *= 0.5; + position += vec2(-position.y, position.x) * sqrt(3.0); + position.x = abs(position.x); + //position.y -= radius - cornerRadius; +// position.y -= radius ; + return position; + +} + +ReturnT thismap(CoordT p, ContextT ctx) { + float radius = THIS_Radius; + float halfSpacing = THIS_Halfspacing; + float cornerRadius = THIS_Cornerradius; + halfSpacing = radius * (1.0 - 0.5*sqrt(3.)); + + p = hexagon(p, radius, halfSpacing, cornerRadius); + return inputOp1(p, ctx); + +} \ No newline at end of file diff --git a/devel/prototypes/hexRepeat.tox b/devel/prototypes/hexRepeat.tox index e33aa8169..610c53772 100644 Binary files a/devel/prototypes/hexRepeat.tox and b/devel/prototypes/hexRepeat.tox differ diff --git a/devel/toolkitEditor/ropEditor/ropEditor.tox b/devel/toolkitEditor/ropEditor/ropEditor.tox index 95207eb7f..7fd965684 100644 Binary files a/devel/toolkitEditor/ropEditor/ropEditor.tox and b/devel/toolkitEditor/ropEditor/ropEditor.tox differ diff --git a/docs/_data/toolkit.yaml b/docs/_data/toolkit.yaml index a5ef23767..218c83cc8 100644 --- a/docs/_data/toolkit.yaml +++ b/docs/_data/toolkit.yaml @@ -1 +1 @@ -toolkitVersion: '0.35' +toolkitVersion: '0.36' diff --git a/docs/_reference/operators/camera/fisheyeCamera.md b/docs/_reference/operators/camera/fisheyeCamera.md index a0065b200..171c99fd5 100644 --- a/docs/_reference/operators/camera/fisheyeCamera.md +++ b/docs/_reference/operators/camera/fisheyeCamera.md @@ -45,6 +45,8 @@ op: summary: Coordinates that the camera should face. - label: Up Vector name: Camup + - label: Enable Look At + name: Enablelookat summary: A 360 fisheye camera, that shows all directions from a specific point in space. thumb: assets/images/reference/operators/camera/fisheyeCamera_thumb.png diff --git a/docs/_reference/operators/field/index.md b/docs/_reference/operators/field/index.md index c7a2f8022..3b953afd4 100644 --- a/docs/_reference/operators/field/index.md +++ b/docs/_reference/operators/field/index.md @@ -96,6 +96,8 @@ cat: status: beta - name: stepField summary: A field that switches between two values at a threshold point. + - name: texture1dField + status: beta - name: texture3dField - name: textureField summary: A float or vector field that looks up values from a texture. diff --git a/docs/_reference/operators/field/texture1dField.md b/docs/_reference/operators/field/texture1dField.md new file mode 100644 index 000000000..e677d0d03 --- /dev/null +++ b/docs/_reference/operators/field/texture1dField.md @@ -0,0 +1,91 @@ +--- +layout: operator +title: texture1dField +parent: Field Operators +grand_parent: Operators +permalink: /reference/operators/field/texture1dField +redirect_from: + - /reference/opType/raytk.operators.field.texture1dField/ +op: + category: field + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Coordinate Field + name: coordField + returnTypes: + - float + - vec4 + name: texture1dField + opType: raytk.operators.field.texture1dField + parameters: + - label: Texture + name: Texture + - label: Coord Type + menuOptions: + - label: Auto + name: auto + - label: 1D + name: float + - label: 2D + name: vec2 + - label: 3D + name: vec3 + name: Coordtype + - label: Return Type + menuOptions: + - label: Float + name: float + - label: Vector + name: vec4 + name: Returntype + - label: Axis + menuOptions: + - label: X + name: x + - label: Y + name: y + - label: Z + name: z + name: Axis + summary: Which axis to use to determine the position in the TOP to use. + - label: Coord Mode + menuOptions: + - label: Position + name: position + - label: Scaled Index + name: scaledindex + name: Coordmode + - label: Translate + name: Translate + summary: Offsets the coordinate value. This is applied before the "Extend Mode". + - label: Scale + name: Scale + summary: Scales the coordinate value. This is applied before the "Extend Mode". + - label: Index Range + name: Indexrange + - label: Extend Mode + menuOptions: + - label: Hold + name: hold + - label: Zero + name: zero + - label: Repeat + name: repeat + - label: Mirror + name: mirror + name: Extendmode + summary: How to handle coordinates outside the 0..1 range. + status: beta + +--- diff --git a/docs/_reference/operators/filter/assignAttribute.md b/docs/_reference/operators/filter/assignAttribute.md new file mode 100644 index 000000000..dbb53159a --- /dev/null +++ b/docs/_reference/operators/filter/assignAttribute.md @@ -0,0 +1,68 @@ +--- +layout: operator +title: assignAttribute +parent: Filter Operators +grand_parent: Operators +permalink: /reference/operators/filter/assignAttribute +redirect_from: + - /reference/opType/raytk.operators.filter.assignAttribute/ +op: + category: filter + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: SDF + name: definition_in + required: true + returnTypes: + - Sdf + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Value Field + name: valueField + returnTypes: + - float + name: assignAttribute + opType: raytk.operators.filter.assignAttribute + parameters: + - label: Enable + name: Enable + - label: Attribute Name + name: Attributename + - label: Data Type + menuOptions: + - label: Float + name: float + - label: Vector + name: vec4 + name: Datatype + - label: Value + name: Value + status: beta + variables: + - label: previous + name: previous + - label: sdf + name: sdf + +--- diff --git a/docs/_reference/operators/filter/gridClone.md b/docs/_reference/operators/filter/gridClone.md index 8759aa388..46dde9f46 100644 --- a/docs/_reference/operators/filter/gridClone.md +++ b/docs/_reference/operators/filter/gridClone.md @@ -24,6 +24,21 @@ op: required: true returnTypes: - Sdf + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + - vec3 + label: Blend Radius Field + name: blendRadiusField + required: true + returnTypes: + - float name: gridClone opType: raytk.operators.filter.gridClone parameters: diff --git a/docs/_reference/operators/filter/index.md b/docs/_reference/operators/filter/index.md index 2d284ecb2..28796d158 100644 --- a/docs/_reference/operators/filter/index.md +++ b/docs/_reference/operators/filter/index.md @@ -27,6 +27,8 @@ cat: name: adjustColor summary: Adjust properties of color values, either directly on a field, or on the assigned surface color of an Sdf result. + - name: assignAttribute + status: beta - keywords: - color - material diff --git a/docs/_reference/operators/filter/knife.md b/docs/_reference/operators/filter/knife.md index 87d96ea9b..5f9eb8b9e 100644 --- a/docs/_reference/operators/filter/knife.md +++ b/docs/_reference/operators/filter/knife.md @@ -72,6 +72,13 @@ op: - label: Z name: z name: Axis + - label: Enable Smoothing + name: Enablesmoothing + summary: Whether to smooth the transition on each side of the slice down to a + size of zero. + - label: Smooth Radius + name: Smoothradius + summary: The amount of smoothing distance. summary: Cuts off an SDF along a plane. thumb: assets/images/reference/operators/filter/knife_thumb.png diff --git a/docs/_reference/operators/filter/limitField.md b/docs/_reference/operators/filter/limitField.md index 0c2c27273..99c840aa9 100644 --- a/docs/_reference/operators/filter/limitField.md +++ b/docs/_reference/operators/filter/limitField.md @@ -64,6 +64,23 @@ op: returnTypes: - float - vec4 + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Blending Field + name: blendingField + required: true + returnTypes: + - float keywords: - clamp - limit @@ -87,11 +104,19 @@ op: name: clamplow - label: Clamp High name: clamphigh + - label: Smooth Clamp + name: smoothclamp + - label: Smooth Clamp Low + name: smoothclamplow + - label: Smooth Clamp High + name: smoothclamphigh name: Limittype - label: Low Bound name: Low - label: High Bound name: High + - label: Blending + name: Blending summary: Limits the values produced by a float or vector field. thumb: assets/images/reference/operators/filter/limitField_thumb.png diff --git a/docs/_reference/operators/filter/linearClone.md b/docs/_reference/operators/filter/linearClone.md index ca5229042..ecfffc9da 100644 --- a/docs/_reference/operators/filter/linearClone.md +++ b/docs/_reference/operators/filter/linearClone.md @@ -26,6 +26,21 @@ op: required: true returnTypes: - Sdf + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + - vec3 + label: Blend Radius Field + name: blendRadiusField + required: true + returnTypes: + - float name: linearClone opType: raytk.operators.filter.linearClone parameters: diff --git a/docs/_reference/operators/filter/modulo1D.md b/docs/_reference/operators/filter/modulo1D.md index 87f3903de..fac0bbf99 100644 --- a/docs/_reference/operators/filter/modulo1D.md +++ b/docs/_reference/operators/filter/modulo1D.md @@ -165,6 +165,8 @@ op: name: cellcoord - label: normcoord name: normcoord + - label: shiftedcellcoord + name: shiftedcellcoord --- diff --git a/docs/_reference/operators/filter/modulo2D.md b/docs/_reference/operators/filter/modulo2D.md index dc79218d9..8494cd2ee 100644 --- a/docs/_reference/operators/filter/modulo2D.md +++ b/docs/_reference/operators/filter/modulo2D.md @@ -175,6 +175,8 @@ op: name: tiledquad - label: normcoord name: normcoord + - label: shiftedcellcoord + name: shiftedcellcoord --- diff --git a/docs/_reference/operators/filter/modulo3D.md b/docs/_reference/operators/filter/modulo3D.md index 519a399b8..fad0d5563 100644 --- a/docs/_reference/operators/filter/modulo3D.md +++ b/docs/_reference/operators/filter/modulo3D.md @@ -136,6 +136,8 @@ op: name: cellcoord - label: normcoord name: normcoord + - label: shiftedcellcoord + name: shiftedcellcoord --- diff --git a/docs/_reference/operators/filter/radialClone.md b/docs/_reference/operators/filter/radialClone.md index f55610a1a..d9869a5b7 100644 --- a/docs/_reference/operators/filter/radialClone.md +++ b/docs/_reference/operators/filter/radialClone.md @@ -56,6 +56,21 @@ op: required: true returnTypes: - float + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + - vec3 + label: Blend Radius Field + name: blendRadiusField + required: true + returnTypes: + - float keywords: - clone - copy diff --git a/docs/_reference/operators/function/pausingWaveFn.md b/docs/_reference/operators/function/pausingWaveFn.md index 17cbeb13e..3ba0e83d3 100644 --- a/docs/_reference/operators/function/pausingWaveFn.md +++ b/docs/_reference/operators/function/pausingWaveFn.md @@ -8,6 +8,33 @@ redirect_from: - /reference/opType/raytk.operators.function.pausingWaveFn/ op: category: function + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + label: Low Width Field + name: lowWidthField + returnTypes: + - float + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + label: High Width Field + name: highWidthField + returnTypes: + - float keywords: - toggle - wave diff --git a/docs/_reference/operators/material/modularMat.md b/docs/_reference/operators/material/modularMat.md index 24bd18ec0..c3374210c 100644 --- a/docs/_reference/operators/material/modularMat.md +++ b/docs/_reference/operators/material/modularMat.md @@ -160,6 +160,8 @@ op: name: normal - label: reflectcolor name: reflectcolor + - label: sdf + name: sdf --- diff --git a/docs/_reference/operators/output/raymarchRender3D.md b/docs/_reference/operators/output/raymarchRender3D.md index 7e66ae84e..fa07e2e23 100644 --- a/docs/_reference/operators/output/raymarchRender3D.md +++ b/docs/_reference/operators/output/raymarchRender3D.md @@ -277,10 +277,6 @@ op: name: Enablesecondaryraycast - label: Secondary Ray Cast name: Secondaryraycast - - label: Attributes - name: Headerattrs - - label: Attribute Definitions - name: Attributedefinitions - label: Customize Shader Config name: Customizeshaderconfig - label: Enable UV Output diff --git a/docs/_reference/operators/sdf/boxSdf.md b/docs/_reference/operators/sdf/boxSdf.md index 7b05aa348..7872eeaba 100644 --- a/docs/_reference/operators/sdf/boxSdf.md +++ b/docs/_reference/operators/sdf/boxSdf.md @@ -31,13 +31,10 @@ op: name: boxSdf opType: raytk.operators.sdf.boxSdf parameters: - - label: Box Type - menuOptions: + - menuOptions: - description: A bit more efficient but slightly less accurate. - label: Box Cheap name: boxcheap - description: More accurate but slightly less efficient. - label: Box name: box name: Boxtype summary: The type of box function. diff --git a/docs/_reference/operators/sdf/index.md b/docs/_reference/operators/sdf/index.md index 1ae6e6ce7..5a94c3146 100644 --- a/docs/_reference/operators/sdf/index.md +++ b/docs/_reference/operators/sdf/index.md @@ -224,6 +224,7 @@ cat: name: torusSdf summary: SDF for a torus. - name: truncatedPyramidSdf + - name: vesicaSegmentSdf summary: 'Signed distances functions which define geometry in 3D space, by calculating the distance from the surface of the shape at any given point.' diff --git a/docs/_reference/operators/sdf/petalSdf.md b/docs/_reference/operators/sdf/petalSdf.md index b53886d07..f6913985e 100644 --- a/docs/_reference/operators/sdf/petalSdf.md +++ b/docs/_reference/operators/sdf/petalSdf.md @@ -36,6 +36,32 @@ op: name: radiusField returnTypes: - float + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec3 + label: Width Field + name: widthField + returnTypes: + - float + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec3 + label: Wrap Field + name: wrapField + returnTypes: + - float name: petalSdf opType: raytk.operators.sdf.petalSdf parameters: diff --git a/docs/_reference/operators/sdf/vesicaSegmentSdf.md b/docs/_reference/operators/sdf/vesicaSegmentSdf.md new file mode 100644 index 000000000..9e809f44e --- /dev/null +++ b/docs/_reference/operators/sdf/vesicaSegmentSdf.md @@ -0,0 +1,71 @@ +--- +layout: operator +title: vesicaSegmentSdf +parent: Sdf Operators +grand_parent: Operators +permalink: /reference/operators/sdf/vesicaSegmentSdf +redirect_from: + - /reference/opType/raytk.operators.sdf.vesicaSegmentSdf/ +op: + category: sdf + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec3 + label: Endpoint 1 Field + name: endpoint1 + returnTypes: + - vec4 + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec3 + label: Endpoint 2 Field + name: endpoint2 + returnTypes: + - vec4 + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec3 + label: Radius Field + name: radiusField + returnTypes: + - float + name: vesicaSegmentSdf + opType: raytk.operators.sdf.vesicaSegmentSdf + parameters: + - label: Translate + name: Translate + summary: Moves the center of the capsule. + - label: End Point 1 + name: Endpoint1 + summary: Distance of the first end from the center position. + - label: End Point 2 + name: Endpoint2 + summary: Distance of the second end from the center position. + - label: Radius + name: Radius + summary: The thickness of the capsule. + thumb: assets/images/reference/operators/sdf/vesicaSegmentSdf_thumb.png + variables: + - label: normoffset + name: normoffset + +--- diff --git a/docs/_reference/operators/sdf2d/index.md b/docs/_reference/operators/sdf2d/index.md index a45bdf335..7d23e78a2 100644 --- a/docs/_reference/operators/sdf2d/index.md +++ b/docs/_reference/operators/sdf2d/index.md @@ -49,6 +49,7 @@ cat: - name: heartSdf2d - name: hexagonalGridSdf2d - name: horseshoeSdf2d + - name: isoscelesTriangleSdf2d - name: jointSdf2d - name: kochSnowflakeSdf2d status: beta @@ -92,6 +93,7 @@ cat: - name: vesicaSdf2d summary: SDF for a 2d vesica, which is a shape based on the overlap between two circles. + - name: vesicaSegmentSdf2d - name: wedgeSdf2d status: beta summary: 'Signed distances functions which define geometry in 2D space, by calculating diff --git a/docs/_reference/operators/sdf2d/isoscelesTriangleSdf2d.md b/docs/_reference/operators/sdf2d/isoscelesTriangleSdf2d.md new file mode 100644 index 000000000..058bd3f29 --- /dev/null +++ b/docs/_reference/operators/sdf2d/isoscelesTriangleSdf2d.md @@ -0,0 +1,68 @@ +--- +layout: operator +title: isoscelesTriangleSdf2d +parent: Sdf2d Operators +grand_parent: Operators +permalink: /reference/operators/sdf2d/isoscelesTriangleSdf2d +redirect_from: + - /reference/opType/raytk.operators.sdf2d.isoscelesTriangleSdf2d/ +op: + category: sdf2d + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + label: Height Field + name: heightField + returnTypes: + - float + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + label: Width Field + name: widthField + returnTypes: + - float + name: isoscelesTriangleSdf2d + opType: raytk.operators.sdf2d.isoscelesTriangleSdf2d + parameters: + - label: Direction + menuOptions: + - label: Right (X+) + name: xpos + - label: Left (X-) + name: xneg + - label: Up (Y+) + name: ypos + - label: Down (Y-) + name: yneg + name: Direction + - label: Position Mode + menuOptions: + - label: Base Centered + name: base + - label: Tip Centered + name: tip + name: Positionmode + - label: Height + name: Height + summary: The distance from the base of an iscosceles triangle to the opposite + tip. + - label: Width + name: Width + summary: The width of the base of an isosceles triangle. + thumb: assets/images/reference/operators/sdf2d/isoscelesTriangleSdf2d_thumb.png + +--- diff --git a/docs/_reference/operators/sdf2d/roundedRectangleSdf2d.md b/docs/_reference/operators/sdf2d/roundedRectangleSdf2d.md index 97fec2e52..bf3cdcacc 100644 --- a/docs/_reference/operators/sdf2d/roundedRectangleSdf2d.md +++ b/docs/_reference/operators/sdf2d/roundedRectangleSdf2d.md @@ -53,6 +53,13 @@ op: summary: The distance of rounding for each of the four corners. When the roundness exceeds half the `Scale`, the rectangle will have discontinuities along the axes. + - label: Roundness Unit + menuOptions: + - label: Distance + name: dist + - label: Ratio of Scale + name: ratio + name: Roundnessunit summary: SDF for a 2D rectangle with optionally rounded corners. thumb: assets/images/reference/operators/sdf2d/roundedRectangleSdf2d_thumb.png diff --git a/docs/_reference/operators/sdf2d/vesicaSegmentSdf2d.md b/docs/_reference/operators/sdf2d/vesicaSegmentSdf2d.md new file mode 100644 index 000000000..2eb2c047d --- /dev/null +++ b/docs/_reference/operators/sdf2d/vesicaSegmentSdf2d.md @@ -0,0 +1,65 @@ +--- +layout: operator +title: vesicaSegmentSdf2d +parent: Sdf2d Operators +grand_parent: Operators +permalink: /reference/operators/sdf2d/vesicaSegmentSdf2d +redirect_from: + - /reference/opType/raytk.operators.sdf2d.vesicaSegmentSdf2d/ +op: + category: sdf2d + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + label: Point 1 Field + name: point1 + returnTypes: + - vec4 + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + label: Point 2 Field + name: point2 + returnTypes: + - vec4 + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - vec2 + label: Thickness Field + name: thickness + returnTypes: + - float + name: vesicaSegmentSdf2d + opType: raytk.operators.sdf2d.vesicaSegmentSdf2d + parameters: + - label: Point 1 + name: Pointa + - label: Point 2 + name: Pointb + - label: Thickness + name: Thickness + thumb: assets/images/reference/operators/sdf2d/vesicaSegmentSdf2d_thumb.png + variables: + - label: normoffset + name: normoffset + +--- diff --git a/docs/_reference/operators/utility/getAttribute.md b/docs/_reference/operators/utility/getAttribute.md new file mode 100644 index 000000000..729486a83 --- /dev/null +++ b/docs/_reference/operators/utility/getAttribute.md @@ -0,0 +1,42 @@ +--- +layout: operator +title: getAttribute +parent: Utility Operators +grand_parent: Operators +permalink: /reference/operators/utility/getAttribute +redirect_from: + - /reference/opType/raytk.operators.utility.getAttribute/ +op: + category: utility + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: SDF + name: sdf + returnTypes: + - Sdf + name: getAttribute + opType: raytk.operators.utility.getAttribute + parameters: + - label: Attribute Name + name: Attributename + - label: Data Type + menuOptions: + - label: Float + name: float + - label: Vector + name: vec4 + name: Datatype + status: beta + +--- diff --git a/docs/_reference/operators/utility/index.md b/docs/_reference/operators/utility/index.md index 73b080eea..5762c3a0c 100644 --- a/docs/_reference/operators/utility/index.md +++ b/docs/_reference/operators/utility/index.md @@ -10,6 +10,8 @@ cat: operators: - name: exposeValue status: beta + - name: getAttribute + status: beta - name: injectGlobalPosition summary: Calls its input using the untransformed global position. - name: injectObjectId @@ -28,6 +30,8 @@ cat: status: beta - name: speedGenerator status: beta + - name: variableList + status: beta - name: variableReference summary: Accesses the value of a variable provided by another operator. summary: Advanced operators that change how ROP chains behave. diff --git a/docs/_reference/operators/utility/variableList.md b/docs/_reference/operators/utility/variableList.md new file mode 100644 index 000000000..41a1ecebb --- /dev/null +++ b/docs/_reference/operators/utility/variableList.md @@ -0,0 +1,277 @@ +--- +layout: operator +title: variableList +parent: Utility Operators +grand_parent: Operators +permalink: /reference/operators/utility/variableList +redirect_from: + - /reference/opType/raytk.operators.utility.variableList/ +op: + category: utility + inputs: + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Final Output + name: output + required: true + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 1 + name: variable1 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 2 + name: variable2 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 3 + name: variable3 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 4 + name: variable4 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 5 + name: variable5 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 6 + name: variable6 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + - contextTypes: + - Context + - MaterialContext + - CameraContext + - LightContext + - RayContext + - ParticleContext + coordTypes: + - float + - vec2 + - vec3 + - vec4 + label: Variable 7 + name: variable7 + returnTypes: + - float + - vec4 + - Sdf + - Ray + - Light + - Particle + name: variableList + opType: raytk.operators.utility.variableList + parameters: + - label: Variable 1 + name: Name1 + - label: Data Type 1 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype1 + - label: Variable 2 + name: Name2 + - label: Data Type 2 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype2 + - label: Variable 3 + name: Name3 + - label: Data Type 3 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype3 + - label: Variable 4 + name: Name4 + - label: Data Type 4 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype4 + - label: Variable 5 + name: Name5 + - label: Data Type 5 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype5 + - label: Variable 6 + name: Name6 + - label: Data Type 6 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype6 + - label: Variable 7 + name: Name7 + - label: Data Type 7 + menuOptions: + - label: Auto + name: auto + - label: Float + name: float + - label: Vector + name: vec4 + - label: Sdf + name: Sdf + name: Datatype7 + status: beta + +--- diff --git a/docs/assets/images/reference/operators/camera/fisheyeCamera_thumb.png b/docs/assets/images/reference/operators/camera/fisheyeCamera_thumb.png index 93c1c566b..b4f4641e7 100644 Binary files a/docs/assets/images/reference/operators/camera/fisheyeCamera_thumb.png and b/docs/assets/images/reference/operators/camera/fisheyeCamera_thumb.png differ diff --git a/docs/assets/images/reference/operators/sdf/vesicaSegmentSdf_thumb.png b/docs/assets/images/reference/operators/sdf/vesicaSegmentSdf_thumb.png new file mode 100644 index 000000000..40348eace Binary files /dev/null and b/docs/assets/images/reference/operators/sdf/vesicaSegmentSdf_thumb.png differ diff --git a/docs/assets/images/reference/operators/sdf2d/isoscelesTriangleSdf2d_thumb.png b/docs/assets/images/reference/operators/sdf2d/isoscelesTriangleSdf2d_thumb.png new file mode 100644 index 000000000..4d97182db Binary files /dev/null and b/docs/assets/images/reference/operators/sdf2d/isoscelesTriangleSdf2d_thumb.png differ diff --git a/docs/assets/images/reference/operators/sdf2d/vesicaSegmentSdf2d_thumb.png b/docs/assets/images/reference/operators/sdf2d/vesicaSegmentSdf2d_thumb.png new file mode 100644 index 000000000..3cb4a60c0 Binary files /dev/null and b/docs/assets/images/reference/operators/sdf2d/vesicaSegmentSdf2d_thumb.png differ diff --git a/docs/release-notes.md b/docs/release-notes.md index 03ed25648..e56bbb5e9 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,5 +1,51 @@ # Release Notes +## v0.36 + +### Highlights + +* New SDFs: isoscelesTriangleSdf2d, vesicaSegmentSdf +* Improvements and customization in modulo and cloning operators +* New editor actions + +### Details + +* Improvements / additions + * New OPs + * isoscelesTriangleSdf2d - specialized version of triangleSdf2d with more field inputs + * texture1dField - specialized TOP input for things like color ramps (#1112) + * variableList - define a sequence of variables for use in upstream operators, similar to provideVariable but designed for more complex scenarios (#1116) + * vesicaSegmentSdf, vesicaSegmentSdf2d - similar to line segments but with tapering (#1104) + * New OP features + * assignAttribute - previous value variable to allow modifying existing attributes (#1046) + * assignAttribute/getAttribute - got rid of the defineAttribute operator to treat attributes more like variables (#1046) + * boxSdf - automatically produce an "edge distance" attribute, as a test case for this type of feature (#1113) + * fisheyeCamera - toggle for look at position + * gridClone/linearClone/radialClone - blend radius field inputs (#1119) + * knife - smoothing like in slice (#1108) + * limitField - smooth clamping + * modularMat - expose sdf surface as a variable + * modulo1D, modulo2D, modulo3D - shifted cell index variables that counteract the shift parameter + * multiLight - automatically disable lights when level is zero + * pausingWaveFn - field inputs for low and high width + * petalSdf - field inputs for width and wrap + * roundedRectangleSdf2d - option to scale rounding based on size (#1107) + * Editor tools + * Indent names for param parts in expose param menu + * New action to create a worldPosMap + * New action to simplify rotate to axisRotate (when possible) + * New action to set up positionField input for custom transform on iteratedTransform + * New action to create attribute references from ops that produce them (#1046) +* Fixes + * goochShadingContrib - fix shader error (#1105) + * lfoGenerator - fix channel names not updating when changed + * moduloPolar - fix angle conversion when using optimized mode (#1101) + * moduloPolar - fix variable input validation settings +* Changes (potentially breaking) + * boxSdf - remove the "box type" option since the "cheap" mode wasn't useful or beneficial +* Infrastructure / internals + * Change to implicit definition of attributes, with declarations in `variables` tables and references in the `references` tables. Effectively this treats attributes like a type of variable but without explicit references to a source operator. + ## v0.35 ### Highlights diff --git a/raytk-development.toe b/raytk-development.toe index fa5645e65..b9ce84d75 100644 Binary files a/raytk-development.toe and b/raytk-development.toe differ diff --git a/src/components/bufferInspector/bufferInspector.tox b/src/components/bufferInspector/bufferInspector.tox index 4d0f655e3..5f7bee813 100644 Binary files a/src/components/bufferInspector/bufferInspector.tox and b/src/components/bufferInspector/bufferInspector.tox differ diff --git a/src/components/flagToggle/flagToggle.tox b/src/components/flagToggle/flagToggle.tox index 5505ee4d0..a30b505c6 100644 Binary files a/src/components/flagToggle/flagToggle.tox and b/src/components/flagToggle/flagToggle.tox differ diff --git a/src/components/opBasicInfoPanel/opBasicInfoPanel.tox b/src/components/opBasicInfoPanel/opBasicInfoPanel.tox index a212039cc..242613317 100644 Binary files a/src/components/opBasicInfoPanel/opBasicInfoPanel.tox and b/src/components/opBasicInfoPanel/opBasicInfoPanel.tox differ diff --git a/src/components/opDefinition/opDefinition.py b/src/components/opDefinition/opDefinition.py index 4d24bdbfd..323ce9b13 100644 --- a/src/components/opDefinition/opDefinition.py +++ b/src/components/opDefinition/opDefinition.py @@ -1,7 +1,7 @@ import json import math from raytkState import RopState, Macro, Texture, Reference, Variable, Dispatch, Buffer, ValidationError, Constant, \ - InputState + InputState, SurfaceAttribute import re # noinspection PyUnreachableCode @@ -403,23 +403,13 @@ def buildParamChopNamesTable(dat: 'DAT', paramSpecTable: 'DAT'): dat.appendRow(['angle', ' '.join(angleNames)]) dat.appendRow(['constant', ' '.join(constantNames)]) -def validateReferences(dat: 'scriptDAT'): - dat.clear() - dat.appendRow(['path', 'level', 'message']) +def validateReferences(errorDat: 'scriptDAT'): + errorDat.clear() + errorDat.appendRow(['path', 'level', 'message']) path = parent().path - def onError(err): - dat.appendRow([path, 'error', err]) - _prepareReferences(onError=onError) - -def _prepareReferences( - dat: 'Optional[scriptDAT]' = None, - onError: 'Optional[Callable[[str], None]]' = None, -): table = parentPar().Referencetable.eval() if not table or table.numRows < 2: return [] - hostName = parentPar().Name.eval() - namePrefix = hostName + '_' for i in range(1, table.numRows): localName = str(table[1, 'name']) if localName == 'none' or not localName: @@ -429,20 +419,7 @@ def _prepareReferences( continue sourceOp = op(sourcePath) if not sourceOp: - if onError: - onError(f'Invalid source path for reference {localName}') - continue - dataType = table[i, 'dataType'] - if dat: - globalName = namePrefix + localName - dat.appendRow([ - globalName, - localName, - sourcePath, - table[i, 'sourceName'], - dataType, - hostName, - ]) + errorDat.appendRow([path, 'error', f'Invalid source path for reference {localName}']) def validateInputs(dat: 'scriptDAT', inputDefinitions: 'DAT'): dat.clear() @@ -515,7 +492,7 @@ def buildOpState(): builder.loadTextures() builder.loadBuffers() builder.loadReferences() - builder.loadVariables() + builder.loadVariablesAndAttributes() builder.loadDispatchBlocks() return builder.opState @@ -760,39 +737,62 @@ def loadReferences(self): return for i in range(1, table.numRows): localName = str(table[1, 'name']) - sourcePath = str(table[1, 'sourcePath']) - if localName == 'none' or not localName or not sourcePath: + if localName == 'none': continue - sourceOp = op(sourcePath) - if not sourceOp: - self.addError(f'Invalid source path for reference {localName}') - continue - self.opState.references.append(Reference( - name=self.namePrefix + localName, - localName=localName, - sourcePath=sourcePath, - sourceName=str(table[i, 'sourceName']), - dataType=str(table[i, 'dataType']), - owner=self.opName, - )) + if table[i, 'category'] == 'attribute': + self.opState.references.append(Reference( + name=self.namePrefix + localName, + localName=localName, + sourcePath=None, + sourceName=str(table[i, 'sourceName']), + dataType=str(table[i, 'dataType']), + owner=self.opName, + category='attribute', + )) + else: + sourcePath = str(table[1, 'sourcePath']) + if not localName or not sourcePath: + continue + sourceOp = op(sourcePath) + if not sourceOp: + self.addError(f'Invalid source path for reference {localName}') + continue + self.opState.references.append(Reference( + name=self.namePrefix + localName, + localName=localName, + sourcePath=sourcePath, + sourceName=str(table[i, 'sourceName']), + dataType=str(table[i, 'dataType']), + owner=self.opName, + category='variable', + )) - def loadVariables(self): + def loadVariablesAndAttributes(self): self.opState.variables = [] + self.opState.attributes = [] table = self.defPar.Variabletable.eval() if not table or table.numRows < 2: return for i in range(1, table.numRows): if _isFalseStr(table[i, 'enable']): continue - localName = table[i, 'name'].val - self.opState.variables.append(Variable( - name=self.namePrefix + localName, - localName=localName, - label=table[i, 'label'].val or localName, - dataType=table[i, 'dataType'].val, - owner=self.opName, - macros=str(table[i, 'macros'] or ''), - )) + if table[i, 'category'] == 'attribute': + self.opState.attributes.append(SurfaceAttribute( + name=table[i, 'name'].val, + label=table[i, 'label'].val or table[i, 'name'].val, + dataType=table[i, 'dataType'].val, + macros=str(table[i, 'macros'] or ''), + )) + else: + localName = table[i, 'name'].val + self.opState.variables.append(Variable( + name=self.namePrefix + localName, + localName=localName, + label=table[i, 'label'].val or localName, + dataType=table[i, 'dataType'].val, + owner=self.opName, + macros=str(table[i, 'macros'] or ''), + )) def loadDispatchBlocks(self): self.opState.dispatchBlocks = [] diff --git a/src/components/opPicker/opPicker.tox b/src/components/opPicker/opPicker.tox index 75312ed96..a9269344d 100644 Binary files a/src/components/opPicker/opPicker.tox and b/src/components/opPicker/opPicker.tox differ diff --git a/src/components/shaderBuilder/buildShader.py b/src/components/shaderBuilder/buildShader.py index 750434891..0cb6ad838 100644 --- a/src/components/shaderBuilder/buildShader.py +++ b/src/components/shaderBuilder/buildShader.py @@ -12,4 +12,5 @@ def onCook(dat): typeDefMacroTable=dat.inputs[1], outputBufferTable=dat.inputs[2], variableTable=dat.inputs[3], + referenceTable=dat.inputs[4], ) diff --git a/src/components/shaderBuilder/shaderBuilder.py b/src/components/shaderBuilder/shaderBuilder.py index 9dd1fe5e1..1916e4d9c 100644 --- a/src/components/shaderBuilder/shaderBuilder.py +++ b/src/components/shaderBuilder/shaderBuilder.py @@ -2,7 +2,7 @@ import json from raytkShader import simplifyNames from raytkState import RopState, Dispatch, Texture, Buffer, Macro, Reference, Variable, ValidationError, Constant, \ - InputState + InputState, SurfaceAttribute import re from io import StringIO from typing import Callable, Dict, List, Tuple, Union, Optional @@ -31,7 +31,6 @@ class _OwnerCompPar(_ConfigPar): Supportmaterials: BoolParamT Shaderbuilderconfig: CompParamT Shadertype: StrParamT - Attributedefinitions: StrParamT class _OwnerComp(COMP): par: '_OwnerCompPar' @@ -303,35 +302,53 @@ def buildTypedefMacroTable(self, dat: 'scriptDAT'): def processReferenceTable(self, dat: 'scriptDAT'): dat.clear() - dat.appendRow(['name', 'owner', 'localName', 'source', 'dataType']) + dat.appendRow(['name', 'owner', 'localName', 'source', 'dataType', 'category']) defTable = self._definitionTable() varNames = {} + attrNames = set() states = self._parseOpStates() for state in states: - if not state.variables: - continue - for variable in state.variables: - varOwnerName = variable.owner - varOwnerPath = defTable[varOwnerName, 'path'].val - varNames[(varOwnerPath, variable.localName)] = variable.name + if state.variables: + for variable in state.variables: + varOwnerName = variable.owner + varOwnerPath = defTable[varOwnerName, 'path'].val + varNames[(varOwnerPath, variable.localName)] = variable.name + if state.attributes: + for attribute in state.attributes: + attrNames.add(attribute.name) for state in states: if not state.references: continue for reference in state.references: - if not reference.sourcePath or not reference.sourceName: - continue - sourceName = varNames.get((reference.sourcePath, reference.sourceName), None) - if not sourceName: - # TODO: report invalid ref - continue - # TODO: validate dataType match - dat.appendRow([ - reference.name, - reference.owner, - reference.localName, - sourceName, - reference.dataType, - ]) + if reference.category == 'attribute': + if not reference.name or reference.sourceName not in attrNames: + # TODO: report invalid ref + continue + # TODO: validate dataType match + dat.appendRow([ + reference.name, + reference.owner, + reference.localName, + reference.sourceName, + reference.dataType, + 'attribute', + ]) + else: + if not reference.sourcePath or not reference.sourceName: + continue + sourceName = varNames.get((reference.sourcePath, reference.sourceName), None) + if not sourceName: + # TODO: report invalid ref + continue + # TODO: validate dataType match + dat.appendRow([ + reference.name, + reference.owner, + reference.localName, + sourceName, + reference.dataType, + 'variable', + ]) def processVariableTable( self, @@ -340,7 +357,11 @@ def processVariableTable( ): dat.clear() dat.appendRow(['name', 'owner', 'localName', 'dataType', 'macros']) - refNames = set(c.val for c in procRefTable.col('source')[1:]) + refNames = set( + procRefTable[i, 'source'].val + for i in range(1, procRefTable.numRows) + if procRefTable[i, 'category'] == 'variable' + ) states = self._parseOpStates() for state in states: if not state.variables: @@ -457,6 +478,7 @@ def writeShader( typeDefMacroTable: 'DAT', outputBufferTable: 'DAT', variableTable: 'DAT', + referenceTable: 'DAT', ): dat.clear() dat.write(' ') @@ -470,6 +492,7 @@ def writeShader( libraryDats=self._getLibraryDats(), outputBufferTable=outputBufferTable, variableTable=variableTable, + referenceTable=referenceTable, ) # import cProfile # cProfile.runctx('writer.run(dat)', globals(), locals()) @@ -565,6 +588,8 @@ def _validateRefsFromNode(self, node: '_GraphROP'): # print(f'Checking references from {node.state.name}') # for each outgoing reference, check the graph along the ROPs outputs for a source for reference in node.state.references: + if reference.category != 'category': + continue # print(f' Checking reference {reference.name}') refSourceNode = self.nodesByPath.get(reference.sourcePath) if not refSourceNode: @@ -673,13 +698,14 @@ class _Writer: libraryDats: 'List[DAT]' outputBufferTable: 'DAT' variableTable: 'DAT' + referenceTable: 'DAT' inlineTypedefRepls: 'Optional[Dict[str, str]]' = None inlineTypedefPattern: 'Optional[re.Pattern]' = None dispatchBlocks: 'Optional[List[Dispatch]]' = None textures: 'Optional[List[Texture]]' = None buffers: 'Optional[List[Buffer]]' = None - attributes: 'Optional[List[_AttributeDef]]' = None + attributes: 'Optional[List[SurfaceAttribute]]' = None out: 'Optional[StringIO]' = None def __post_init__(self): @@ -696,23 +722,13 @@ def __post_init__(self): self.textures = [] self.buffers = [] self.dispatchBlocks = [] - self.attributes = [] attrNames = set() - for defComp in self.ownerComp.par.Attributedefinitions.evalOPs(): - attr = _AttributeDef( - name=defComp.par.Attributename.eval(), - dataType=defComp.par.Datatype.eval(), - defaultValue=( - defComp.par.Defaultvaluex.eval(), - defComp.par.Defaultvaluey.eval(), - defComp.par.Defaultvaluez.eval(), - defComp.par.Defaultvaluew.eval(), - ) - ) - if not attr.name or attr.name in attrNames: - continue - self.attributes.append(attr) - attrNames.add(attr.name) + attrRefNames = [ + self.referenceTable[i, 'source'].val + for i in range(1, self.referenceTable.numRows) + if self.referenceTable[i, 'category'] == 'attribute' + ] + self.attributes = [] for state in self.opStates: if state.dispatchBlocks: self.dispatchBlocks += state.dispatchBlocks @@ -720,6 +736,12 @@ def __post_init__(self): self.textures += state.textures if state.buffers: self.buffers += state.buffers + if state.attributes: + for attribute in state.attributes: + if attribute.name not in attrRefNames or attribute.name in attrNames: + continue + attrNames.add(attribute.name) + self.attributes.append(attribute) def run(self, dat: 'scriptDAT'): if self.defTable.numRows < 2: @@ -795,14 +817,14 @@ def _writeAttributesBlock(self): if self.attributes: self._writeMacro('RAYTK_HAS_ATTRS') for attr in self.attributes: - self._writeMacro(f'RAYTK_ATTR_EXISTS_{attr.name}') + self._writeMacro(f'RAYTK_HAS_ATTR_{attr.name}') self._writeLine('struct Attrs {') for attr in self.attributes: - self._writeLine(f' {attr.field()}') + self._writeLine(f' {attr.dataType} {attr.name};') self._writeLine('};') self._writeLine('void initAttrs(inout Attrs a) {') for attr in self.attributes: - self._writeLine(f' a.{attr.name} = {attr.defaultExpr()};') + self._writeLine(f' a.{attr.name} = {attr.dataType}(0.);') self._writeLine('}') self._writeLine('void mixAttrs(inout Attrs a, in Attrs b, float amt) {') for attr in self.attributes: @@ -1051,20 +1073,6 @@ def _inlineTypedefs(self, code: 'str'): def _processCode(self, code: str): return self._inlineTypedefs(code) -@dataclass -class _AttributeDef: - name: str - dataType: str - defaultValue: Tuple[float, float, float, float] - - def field(self): - return f'{self.dataType} {self.name};' - - def defaultExpr(self): - if self.dataType == 'float': - return str(self.defaultValue[0]) - return f'vec4({self.defaultValue[0]}, {self.defaultValue[1]}, {self.defaultValue[2]}, {self.defaultValue[3]})' - @dataclass class _ParamTupletSpec: tuplet: str @@ -1341,14 +1349,20 @@ def _parseOpStateJson(text: str): arr = obj.get('references') if arr: state.references = [ - # Reference(o['name'], o['localName'], o['sourcePath'], o['sourceName'], o['dataType'], o['owner']) + # Reference(o['name'], o['localName'], o['sourcePath'], o['sourceName'], o['dataType'], o['owner'], o['category']) Reference(**o) for o in arr ] + arr = obj.get('attributes') + if arr: + state.attributes = [ + SurfaceAttribute(**o) + for o in arr + ] arr = obj.get('variables') if arr: state.variables = [ - # Variable(o['name'], o['localName'], o.get('label'), o['dataType'], o['owner'], o.get('macros')) + # Variable(o['name'], o['localName'], o.get('label'), o['dataType'], o['owner'], o.get('macros'), o.get('category')) Variable(**o) for o in arr ] diff --git a/src/components/shaderBuilder/shaderBuilder.tox b/src/components/shaderBuilder/shaderBuilder.tox index 125a74822..c29fb5f7f 100644 Binary files a/src/components/shaderBuilder/shaderBuilder.tox and b/src/components/shaderBuilder/shaderBuilder.tox differ diff --git a/src/components/shared/shared.tox b/src/components/shared/shared.tox index 51f005ce9..c5320234a 100644 Binary files a/src/components/shared/shared.tox and b/src/components/shared/shared.tox differ diff --git a/src/lib/raytkState.py b/src/lib/raytkState.py index 128c1248b..41f430ff6 100644 --- a/src/lib/raytkState.py +++ b/src/lib/raytkState.py @@ -44,6 +44,7 @@ class RopState(_StateObject): buffers: Optional[List['Buffer']] = None references: Optional[List['Reference']] = None variables: Optional[List['Variable']] = None + attributes: Optional[List['SurfaceAttribute']] = None dispatchBlocks: Optional[List['Dispatch']] = None materialId: Optional[str] = None @@ -94,10 +95,11 @@ class Texture(_StateObject): class Reference(_StateObject): name: str localName: str - sourcePath: str - sourceName: str + sourceName: Optional[str] dataType: str - owner: str + owner: Optional[str] + sourcePath: Optional[str] = None + category: Optional[str] = None @dataclass class Variable(_StateObject): @@ -108,6 +110,13 @@ class Variable(_StateObject): owner: str macros: Optional[str] = None +@dataclass +class SurfaceAttribute(_StateObject): + name: str + label: str + dataType: str + macros: Optional[str] = None + @dataclass class Dispatch(_StateObject): name: str diff --git a/src/operators/camera/basicCamera.tox b/src/operators/camera/basicCamera.tox index 2887dc7b5..2c1f6b9d6 100644 Binary files a/src/operators/camera/basicCamera.tox and b/src/operators/camera/basicCamera.tox differ diff --git a/src/operators/camera/basicCamera.yaml b/src/operators/camera/basicCamera.yaml index eaca68f0b..28846d9f4 100644 --- a/src/operators/camera/basicCamera.yaml +++ b/src/operators/camera/basicCamera.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.camera.basicCamera - opVersion: '6' + opVersion: '7' opStatus: default opDef: !def enable: true diff --git a/src/operators/camera/fisheyeCamera.glsl b/src/operators/camera/fisheyeCamera.glsl index 86440ca3f..6f5db244a 100644 --- a/src/operators/camera/fisheyeCamera.glsl +++ b/src/operators/camera/fisheyeCamera.glsl @@ -12,7 +12,12 @@ ReturnT thismap(CoordT p, ContextT ctx) { // Calculate ray direction vec3 up = THIS_Camup; vec3 lookAt = THIS_Lookatpos; - vec3 camForward = normalize(lookAt - ray.pos); + vec3 camForward; + if (IS_TRUE(THIS_Enablelookat)) { + camForward = normalize(lookAt - ray.pos); + } else { + camForward = vec3(0., 0., 1.); + } vec3 camRight = normalize(cross(camForward, up)); vec3 camUp = cross(camForward, camRight); mat3 camOrient = mat3(camRight, camUp, camForward); diff --git a/src/operators/camera/fisheyeCamera.tox b/src/operators/camera/fisheyeCamera.tox index f832c4a03..64e1b159a 100644 Binary files a/src/operators/camera/fisheyeCamera.tox and b/src/operators/camera/fisheyeCamera.tox differ diff --git a/src/operators/camera/fisheyeCamera.yaml b/src/operators/camera/fisheyeCamera.yaml index 2fcc3029d..f992d07c1 100644 --- a/src/operators/camera/fisheyeCamera.yaml +++ b/src/operators/camera/fisheyeCamera.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.camera.fisheyeCamera - opVersion: '8' + opVersion: '9' opStatus: default opDef: !def enable: true @@ -32,6 +32,7 @@ elements: name: codeSwitcher_Fisheyemode elementType: codeSwitcher params: + Elementroot: '' Table: !table file: src/operators/camera/fisheyeCamera_modes.txt name: modes @@ -40,4 +41,5 @@ elements: Manageparamstates: true Alwaysincludeallparams: false Switchmode: auto + Indexexpr: '' Placeholder: BODY(); diff --git a/src/operators/camera/fisheyeCamera_params.txt b/src/operators/camera/fisheyeCamera_params.txt index 3748ccc3e..f4a7c6b4f 100644 --- a/src/operators/camera/fisheyeCamera_params.txt +++ b/src/operators/camera/fisheyeCamera_params.txt @@ -1,3 +1,4 @@ names source handling readOnlyHandling conversion enable Campos[xyz] Lookatpos[xyz] Camup[xyz] Camfov Aperture param runtime macro 1 Camrot[xyz] param runtime macro angle 1 +Enablelookat param runtime constant 1 diff --git a/src/operators/camera/lookAtCamera.tox b/src/operators/camera/lookAtCamera.tox index 0c15b4ebe..55ffddb03 100644 Binary files a/src/operators/camera/lookAtCamera.tox and b/src/operators/camera/lookAtCamera.tox differ diff --git a/src/operators/camera/lookAtCamera.yaml b/src/operators/camera/lookAtCamera.yaml index f1b942831..a9f4ed221 100644 --- a/src/operators/camera/lookAtCamera.yaml +++ b/src/operators/camera/lookAtCamera.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.camera.lookAtCamera - opVersion: '8' + opVersion: '9' opStatus: default opDef: !def enable: true diff --git a/src/operators/field/index.tox b/src/operators/field/index.tox index 1aaf5e6c1..a0dfe9731 100644 Binary files a/src/operators/field/index.tox and b/src/operators/field/index.tox differ diff --git a/src/operators/field/texture1dField.glsl b/src/operators/field/texture1dField.glsl new file mode 100644 index 000000000..23a771e49 --- /dev/null +++ b/src/operators/field/texture1dField.glsl @@ -0,0 +1,30 @@ +ReturnT thismap(CoordT p, ContextT ctx) { + #ifdef THIS_HAS_INPUT_coordField + vec3 q = adaptAsVec3(inputOp_coordField(p, ctx)); + #else + vec3 q = adaptAsVec3(p); + #endif + float u = getAxis(q, int(THIS_Axis)); + vec4 value; + #if defined(THIS_Coordmode_position) + u = (u - THIS_Translate) / THIS_Scale; + #elif defined(THIS_Coordmode_scaledindex) + u = map01(u, THIS_Indexrange.x, THIS_Indexrange.y); + #endif + + #if defined(THIS_Extendmode_hold) + u = clamp(u, 0, 1); + #elif defined(THIS_Extendmode_repeat) + u = fract(u); + #elif defined(THIS_Extendmode_mirror) + u = modZigZag(u); + #elif defined(THIS_Extendmode_zero) + if (u < 0 || u > 1) { + return ReturnT(0.); + } + #endif + + value = textureLod(THIS_texture, vec2(u, 0.), 0); + + return THIS_asReturnT(value); +} \ No newline at end of file diff --git a/src/operators/field/texture1dField.tox b/src/operators/field/texture1dField.tox new file mode 100644 index 000000000..2e28cd923 Binary files /dev/null and b/src/operators/field/texture1dField.tox differ diff --git a/src/operators/field/texture1dField.yaml b/src/operators/field/texture1dField.yaml new file mode 100644 index 000000000..79f7f61ea --- /dev/null +++ b/src/operators/field/texture1dField.yaml @@ -0,0 +1,57 @@ +!rop +meta: !meta + opType: raytk.operators.field.texture1dField + opVersion: '0' + opStatus: beta +opDef: !def + enable: true + typeSpec: !ropTypes + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: !expr + expr: parent().par.Returntype == 'float' + Returntypevec4: !expr + expr: parent().par.Returntype == 'vec4' + function: !text + file: src/operators/field/texture1dField.glsl + name: function + paramGroupTable: eval_params + libraryNames: !expr + expr: op('modZigZag') + textureTable: !table + file: src/operators/field/texture1dField_textures.txt + name: texture_exprs + evaluate: true + evalOpts: !evalOpts + excludeFirstRow: true + cols: path + displayCategory: Texture +inputs: +- !input + Localalias: coordField + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true + Returntypevec4: true +elements: +- !opElement + name: codeSwitcher_Coordmode + elementType: codeSwitcher + params: + Elementroot: '' + Table: !table + file: src/operators/field/texture1dField_coordMode.txt + name: coordModes + Param: Coordmode + Autoupdateparams: true + Manageparamstates: true + Alwaysincludeallparams: false + Switchmode: none + Indexexpr: '' + Placeholder: '' diff --git a/src/operators/field/texture1dField_coordMode.txt b/src/operators/field/texture1dField_coordMode.txt new file mode 100644 index 000000000..2bbfb8693 --- /dev/null +++ b/src/operators/field/texture1dField_coordMode.txt @@ -0,0 +1,3 @@ +name label params +position Position Translate Scale +scaledindex Scaled Index Indexrange[1-2] diff --git a/src/operators/field/texture1dField_params.txt b/src/operators/field/texture1dField_params.txt new file mode 100644 index 000000000..fea57fc05 --- /dev/null +++ b/src/operators/field/texture1dField_params.txt @@ -0,0 +1,4 @@ +names source handling readOnlyHandling conversion enable +Extendmode param macro 1 +Length special runtime macro 1 +Axis param runtime constant 1 diff --git a/src/operators/field/texture1dField_textures.txt b/src/operators/field/texture1dField_textures.txt new file mode 100644 index 000000000..37d7a917a --- /dev/null +++ b/src/operators/field/texture1dField_textures.txt @@ -0,0 +1,2 @@ +name path type +texture op(parent().par.Texture) or op('blank') 2d diff --git a/src/operators/filter/assignAttribute.glsl b/src/operators/filter/assignAttribute.glsl index ba2d82696..c08308f97 100644 --- a/src/operators/filter/assignAttribute.glsl +++ b/src/operators/filter/assignAttribute.glsl @@ -4,8 +4,11 @@ ReturnT thismap(CoordT p, ContextT ctx) { #ifdef THIS_EXPOSE_sdf THIS_sdf = res; #endif - #ifdef THIS_ATTR_EXISTS + #ifdef THIS_HAS_ATTR { + #ifdef THIS_EXPOSE_previous + THIS_previous = res.attrs.THIS_NAME; + #endif #ifdef THIS_HAS_INPUT_valueField res.attrs.THIS_NAME = inputOp_valueField(p, ctx); #else diff --git a/src/operators/filter/assignAttribute.tox b/src/operators/filter/assignAttribute.tox index 0059ba6c7..6b4534030 100644 Binary files a/src/operators/filter/assignAttribute.tox and b/src/operators/filter/assignAttribute.tox differ diff --git a/src/operators/filter/assignAttribute.yaml b/src/operators/filter/assignAttribute.yaml index 0a19fc3fc..42bce7988 100644 --- a/src/operators/filter/assignAttribute.yaml +++ b/src/operators/filter/assignAttribute.yaml @@ -1,8 +1,8 @@ !rop meta: !meta opType: raytk.operators.filter.assignAttribute - opVersion: '0' - opStatus: alpha + opVersion: '3' + opStatus: beta opDef: !def enable: !expr expr: op('..').par.Enable @@ -29,7 +29,7 @@ opDef: !def evaluate: true evalOpts: !evalOpts excludeFirstRow: true - cols: enable + cols: name enable dataType inputs: - !input Required: true diff --git a/src/operators/filter/assignAttribute_variables.txt b/src/operators/filter/assignAttribute_variables.txt index 049670fb5..8ac7cce6a 100644 --- a/src/operators/filter/assignAttribute_variables.txt +++ b/src/operators/filter/assignAttribute_variables.txt @@ -1,2 +1,4 @@ -name label dataType enable macros -sdf SDF Surface Sdf 1 +name label dataType enable macros category +'previous' Previous Value parent().par.Datatype 1 variable +'sdf' SDF Surface 'Sdf' 1 variable +parent().par.Attributename parent().par.Datatype 1 attribute diff --git a/src/operators/filter/gridClone.tox b/src/operators/filter/gridClone.tox index 0818f1c46..d81e2d4d2 100644 Binary files a/src/operators/filter/gridClone.tox and b/src/operators/filter/gridClone.tox differ diff --git a/src/operators/filter/gridClone.yaml b/src/operators/filter/gridClone.yaml index bc57207dc..4afe2127b 100644 --- a/src/operators/filter/gridClone.yaml +++ b/src/operators/filter/gridClone.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.gridClone - opVersion: '0' + opVersion: '1' opStatus: beta opDef: !def enable: !expr @@ -39,6 +39,17 @@ inputs: Allcontexttype: true returnType: !returnT Returntypesdf: true +- !input + Localalias: blendRadiusField + Variables: '*' + Required: true + coordType: !coordT + Coordtypevec2: true + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true elements: - !opElement name: combiner @@ -50,7 +61,7 @@ elements: Radiusparam: Mergeradius Numberparam: Mergenumber Offsetparam: Mergeoffset - Radiusfield: '' + Radiusfield: blendRadiusField Offsetfield: '' Numberfield: '' Manageparamstates: true diff --git a/src/operators/filter/knife.glsl b/src/operators/filter/knife.glsl index efcfa8a16..76468341e 100644 --- a/src/operators/filter/knife.glsl +++ b/src/operators/filter/knife.glsl @@ -20,7 +20,13 @@ ReturnT thismap(CoordT p, ContextT ctx) { #if defined(THIS_RETURN_TYPE_float) res = max(plane, res); #elif defined(THIS_RETURN_TYPE_Sdf) - res.x = max(plane, res.x); + { + if (IS_TRUE(THIS_Enablesmoothing)) { + res.x = fOpIntersectionRound(res.x, plane, THIS_Smoothradius); + } else { + res.x = max(plane, res.x); + } + } #else #error invalidReturnType #endif diff --git a/src/operators/filter/knife.tox b/src/operators/filter/knife.tox index 7850a647b..34e4eb785 100644 Binary files a/src/operators/filter/knife.tox and b/src/operators/filter/knife.tox differ diff --git a/src/operators/filter/knife.yaml b/src/operators/filter/knife.yaml index 2697df070..b55606d66 100644 --- a/src/operators/filter/knife.yaml +++ b/src/operators/filter/knife.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.knife - opVersion: '16' + opVersion: '17' opStatus: default paramPages: - !page diff --git a/src/operators/filter/knife_params.txt b/src/operators/filter/knife_params.txt index c850ad398..00a735d61 100644 --- a/src/operators/filter/knife_params.txt +++ b/src/operators/filter/knife_params.txt @@ -1,3 +1,5 @@ names source handling readOnlyHandling conversion enable Rotateplane[xyz] param runtime macro 1 Offset param runtime macro op('offset_definition').numRows < 2 +Smoothradius param runtime macro 1 +Enablesmoothing param runtime constant 1 diff --git a/src/operators/filter/limitField.glsl b/src/operators/filter/limitField.glsl index f6f17676c..8f191b009 100644 --- a/src/operators/filter/limitField.glsl +++ b/src/operators/filter/limitField.glsl @@ -11,6 +11,11 @@ ReturnT thismap(CoordT p, ContextT ctx) { #else ReturnT high = THIS_asReturnT(THIS_High); #endif + #ifdef THIS_HAS_INPUT_blendingField + float b = inputOp_blendingField(p, ctx); + #else + float b = THIS_Blending; + #endif BODY(); } return val; diff --git a/src/operators/filter/limitField.tox b/src/operators/filter/limitField.tox index cc832ac76..395f6a251 100644 Binary files a/src/operators/filter/limitField.tox and b/src/operators/filter/limitField.tox differ diff --git a/src/operators/filter/limitField.yaml b/src/operators/filter/limitField.yaml index ac01f086b..f5857ce49 100644 --- a/src/operators/filter/limitField.yaml +++ b/src/operators/filter/limitField.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.limitField - opVersion: '18' + opVersion: '19' opStatus: default paramPages: - !page @@ -56,6 +56,7 @@ opDef: !def function: !text file: src/operators/filter/limitField.glsl name: functionTemplate + paramGroupTable: eval_params libraryNames: !expr expr: op('modZigZag') help: !text @@ -100,6 +101,16 @@ inputs: returnType: !returnT Returntypefloat: true Returntypevec4: true +- !input + Localalias: blendingField + Variableinputs: inputOp1 lowField highField + Required: true + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true elements: - !opElement name: codeSwitcher_Limittype diff --git a/src/operators/filter/limitField_limitTypes.txt b/src/operators/filter/limitField_limitTypes.txt index c255d7bce..4c92b0ed3 100644 --- a/src/operators/filter/limitField_limitTypes.txt +++ b/src/operators/filter/limitField_limitTypes.txt @@ -4,3 +4,6 @@ loop Loop val = wrapRange(val, low, high); Low[1-4] High[1-4] zigzag Zig-Zag val = modZigZag(val, low, high); Low[1-4] High[1-4] clamplow Clamp Low val = max(val, low); Low[1-4] clamphigh Clamp High val = min(val, high); High[1-4] +smoothclamp Smooth Clamp val = smin(smax(val, low, b), high, b); Low[1-4] High[1-4] Blending +smoothclamplow Smooth Clamp Low val = smax(val, low, b); Low[1-4] Blending +smoothclamphigh Smooth Clamp High val = smin(val, high, b); High[1-4] Blending diff --git a/src/operators/filter/limitField_params.txt b/src/operators/filter/limitField_params.txt new file mode 100644 index 000000000..6ae197a0d --- /dev/null +++ b/src/operators/filter/limitField_params.txt @@ -0,0 +1 @@ +names source handling readOnlyHandling conversion enable diff --git a/src/operators/filter/linearClone.tox b/src/operators/filter/linearClone.tox index ded88f3a1..8f04f995e 100644 Binary files a/src/operators/filter/linearClone.tox and b/src/operators/filter/linearClone.tox differ diff --git a/src/operators/filter/linearClone.yaml b/src/operators/filter/linearClone.yaml index 090c15523..c4d77eece 100644 --- a/src/operators/filter/linearClone.yaml +++ b/src/operators/filter/linearClone.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.linearClone - opVersion: '1' + opVersion: '2' opStatus: default opDef: !def enable: !expr @@ -37,6 +37,17 @@ inputs: Allcontexttype: true returnType: !returnT Returntypesdf: true +- !input + Localalias: blendRadiusField + Variables: '*' + Required: true + coordType: !coordT + Coordtypevec2: true + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true elements: - !opElement name: combiner @@ -48,7 +59,7 @@ elements: Radiusparam: Mergeradius Numberparam: Mergenumber Offsetparam: Mergeoffset - Radiusfield: '' + Radiusfield: blendRadiusField Offsetfield: '' Numberfield: '' Manageparamstates: true diff --git a/src/operators/filter/modulo1D.glsl b/src/operators/filter/modulo1D.glsl index 354d362db..89f7ecbc9 100644 --- a/src/operators/filter/modulo1D.glsl +++ b/src/operators/filter/modulo1D.glsl @@ -72,6 +72,9 @@ void THIS_apply(inout CoordT p, inout ContextT ctx) { } } #endif + #ifdef THIS_EXPOSE_shiftedcellcoord + THIS_shiftedcellcoord = c - sh; + #endif // offset field can use iteration float o = THIS_Offset; diff --git a/src/operators/filter/modulo1D.tox b/src/operators/filter/modulo1D.tox index 719c28877..ef0fb8858 100644 Binary files a/src/operators/filter/modulo1D.tox and b/src/operators/filter/modulo1D.tox differ diff --git a/src/operators/filter/modulo1D.yaml b/src/operators/filter/modulo1D.yaml index b7e3c5de9..20181bb87 100644 --- a/src/operators/filter/modulo1D.yaml +++ b/src/operators/filter/modulo1D.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.modulo1D - opVersion: '32' + opVersion: '34' opStatus: default paramPages: - !page @@ -200,7 +200,7 @@ inputs: Returntypefloat: true - !input Localalias: offsetField - Variables: cellcoord normcoord + Variables: cellcoord normcoord shiftedcellcoord Variableinputs: sizeField shiftField coordType: !coordT Coordtypefloat: true diff --git a/src/operators/filter/modulo1D_variables.txt b/src/operators/filter/modulo1D_variables.txt index dbcbcd8b4..8a6754dbb 100644 --- a/src/operators/filter/modulo1D_variables.txt +++ b/src/operators/filter/modulo1D_variables.txt @@ -1,3 +1,4 @@ name label dataType enable cellcoord Cell Index int 1 normcoord Normalized Cell Index float 1 +shiftedcellcoord Shifted Cell Index float 1 diff --git a/src/operators/filter/modulo2D.glsl b/src/operators/filter/modulo2D.glsl index 77e00980d..62d562c5f 100644 --- a/src/operators/filter/modulo2D.glsl +++ b/src/operators/filter/modulo2D.glsl @@ -87,6 +87,9 @@ void THIS_apply(inout CoordT p, inout ContextT ctx) { } } #endif + #ifdef THIS_EXPOSE_shiftedcellcoord + THIS_shiftedcellcoord = c - sh; + #endif // offset field can use iteration vec2 o = THIS_Offset; #ifdef THIS_HAS_INPUT_offsetField diff --git a/src/operators/filter/modulo2D.tox b/src/operators/filter/modulo2D.tox index 6aad935cc..349e0a861 100644 Binary files a/src/operators/filter/modulo2D.tox and b/src/operators/filter/modulo2D.tox differ diff --git a/src/operators/filter/modulo2D.yaml b/src/operators/filter/modulo2D.yaml index e75db5829..48b4bcaa2 100644 --- a/src/operators/filter/modulo2D.yaml +++ b/src/operators/filter/modulo2D.yaml @@ -69,7 +69,7 @@ inputs: Returntypevec4: true - !input Localalias: offsetField - Variables: cellcoord tiledquad normcoord + Variables: cellcoord tiledquad normcoord shiftedcellcoord Variableinputs: sizeField shiftField coordType: !coordT Coordtypevec2: true diff --git a/src/operators/filter/modulo2D_variables.txt b/src/operators/filter/modulo2D_variables.txt index 41ab85f47..86cc73571 100644 --- a/src/operators/filter/modulo2D_variables.txt +++ b/src/operators/filter/modulo2D_variables.txt @@ -2,3 +2,4 @@ name label dataType enable cellcoord Cell Coord ivec2 1 tiledquad Tiled Quadrant int 1 normcoord Normalized Cell Coord vec2 1 +shiftedcellcoord Shifted Cell Coord vec2 1 diff --git a/src/operators/filter/modulo3D.glsl b/src/operators/filter/modulo3D.glsl index b315ce401..105292640 100644 --- a/src/operators/filter/modulo3D.glsl +++ b/src/operators/filter/modulo3D.glsl @@ -61,6 +61,9 @@ void THIS_apply(inout CoordT p, inout ContextT ctx) { } } #endif + #ifdef THIS_EXPOSE_shiftedcellcoord + THIS_shiftedcellcoord = c - sh; + #endif // offset field can use iteration vec3 o = THIS_Offset; diff --git a/src/operators/filter/modulo3D.tox b/src/operators/filter/modulo3D.tox index 49a76fbbd..9ff06576c 100644 Binary files a/src/operators/filter/modulo3D.tox and b/src/operators/filter/modulo3D.tox differ diff --git a/src/operators/filter/modulo3D.yaml b/src/operators/filter/modulo3D.yaml index 1ac64b2da..88e915b9a 100644 --- a/src/operators/filter/modulo3D.yaml +++ b/src/operators/filter/modulo3D.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.modulo3D - opVersion: '26' + opVersion: '27' opStatus: default opDef: !def enable: !expr @@ -65,7 +65,7 @@ inputs: Returntypevec4: true - !input Localalias: offsetField - Variables: cellcoord normcoord + Variables: cellcoord normcoord shiftedcellcoord Variableinputs: sizeField shiftField coordType: !coordT Coordtypevec3: true diff --git a/src/operators/filter/modulo3D_variables.txt b/src/operators/filter/modulo3D_variables.txt index 87d22fa08..0e3ac47e1 100644 --- a/src/operators/filter/modulo3D_variables.txt +++ b/src/operators/filter/modulo3D_variables.txt @@ -1,3 +1,4 @@ name label dataType enable cellcoord Cell Coord ivec3 1 normcoord Normalized Cell Coord vec3 1 +shiftedcellcoord Shifted Cell Coord vec3 1 diff --git a/src/operators/filter/moduloPolar.glsl b/src/operators/filter/moduloPolar.glsl index fce17bc96..bac488eae 100644 --- a/src/operators/filter/moduloPolar.glsl +++ b/src/operators/filter/moduloPolar.glsl @@ -60,7 +60,7 @@ ReturnT thismap(CoordT p, ContextT ctx) { #ifdef THIS_EXPOSE_centerdist THIS_centerdist = length(q); #endif - float r = THIS_Rotate; + float r = THIS_Rotate - radians(90.0); #ifdef THIS_HAS_INPUT_rotateField r += radians(inputOp_rotateField(p, ctx)); #endif diff --git a/src/operators/filter/moduloPolar.tox b/src/operators/filter/moduloPolar.tox index 8ff237fff..73c29f320 100644 Binary files a/src/operators/filter/moduloPolar.tox and b/src/operators/filter/moduloPolar.tox differ diff --git a/src/operators/filter/moduloPolar.yaml b/src/operators/filter/moduloPolar.yaml index 15c396e04..db90c54f1 100644 --- a/src/operators/filter/moduloPolar.yaml +++ b/src/operators/filter/moduloPolar.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.moduloPolar - opVersion: '27' + opVersion: '29' opStatus: default opDef: !def enable: !expr @@ -49,7 +49,7 @@ inputs: Allreturntype: true - !input Localalias: preRotateField - Variables: step normstep + Variables: step normstep centerdist globalangle normglobalangle normlocalangle coordType: !coordT Coordtypevec2: true Coordtypevec3: true @@ -59,7 +59,7 @@ inputs: Returntypefloat: true - !input Localalias: offsetField - Variables: step normstep + Variables: step normstep centerdist globalangle normglobalangle normlocalangle Variableinputs: preRotateField coordType: !coordT Coordtypevec2: true @@ -71,6 +71,7 @@ inputs: Returntypevec4: true - !input Localalias: rotateField + Variables: centerdist coordType: !coordT Coordtypevec2: true Coordtypevec3: true diff --git a/src/operators/filter/moduloPolar_params.txt b/src/operators/filter/moduloPolar_params.txt index 5d74fc192..6b55f698c 100644 --- a/src/operators/filter/moduloPolar_params.txt +++ b/src/operators/filter/moduloPolar_params.txt @@ -1,3 +1,4 @@ names source handling readOnlyHandling conversion enable -Repetitions Rotate Prerotate Offset[1-2] Pivot[1-2] Limitlow Limithigh param runtime macro 1 +Repetitions Offset[1-2] Pivot[1-2] Limitlow Limithigh param runtime macro 1 +Rotate Prerotate param runtime macro angle 1 Axis Iterationtype Uselimit Mirrortype param constant 1 diff --git a/src/operators/filter/radialClone.tox b/src/operators/filter/radialClone.tox index b85a832da..f17a7e5d0 100644 Binary files a/src/operators/filter/radialClone.tox and b/src/operators/filter/radialClone.tox differ diff --git a/src/operators/filter/radialClone.yaml b/src/operators/filter/radialClone.yaml index 853d88ac8..732020675 100644 --- a/src/operators/filter/radialClone.yaml +++ b/src/operators/filter/radialClone.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.filter.radialClone - opVersion: '24' + opVersion: '25' opStatus: default opDef: !def enable: !expr @@ -68,6 +68,17 @@ inputs: Allcontexttype: true returnType: !returnT Returntypefloat: true +- !input + Localalias: blendRadiusField + Variables: '*' + Required: true + coordType: !coordT + Coordtypevec2: true + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true elements: - !opElement name: combiner @@ -79,7 +90,7 @@ elements: Radiusparam: Mergeradius Numberparam: Mergenumber Offsetparam: Mergeoffset - Radiusfield: '' + Radiusfield: blendRadiusField Offsetfield: '' Numberfield: '' Manageparamstates: true diff --git a/src/operators/function/pausingWaveFn.glsl b/src/operators/function/pausingWaveFn.glsl index 019a21bb7..26beed74b 100644 --- a/src/operators/function/pausingWaveFn.glsl +++ b/src/operators/function/pausingWaveFn.glsl @@ -1,8 +1,16 @@ // https://www.shadertoy.com/view/4tySDW // a lovely function that goes up and down periodically between 0 and 1, pausing at the extremes ReturnT thismap(CoordT p, ContextT ctx) { + #ifdef THIS_HAS_INPUT_lowWidthField + float a = inputOp_lowWidthField(p, ctx); + #else float a = THIS_Lowwidth; + #endif + #ifdef THIS_HAS_INPUT_highWidthField + float b = inputOp_highWidthField(p, ctx); + #else float b = THIS_Highwidth; + #endif float x = abs(fract(p) - .5) * 1. - .5 + a; return smoothstep(0., a - b, x); } \ No newline at end of file diff --git a/src/operators/function/pausingWaveFn.tox b/src/operators/function/pausingWaveFn.tox index 087acf77f..d3f7b5b40 100644 Binary files a/src/operators/function/pausingWaveFn.tox and b/src/operators/function/pausingWaveFn.tox differ diff --git a/src/operators/function/pausingWaveFn.yaml b/src/operators/function/pausingWaveFn.yaml index 1d773c246..83e195c3c 100644 --- a/src/operators/function/pausingWaveFn.yaml +++ b/src/operators/function/pausingWaveFn.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.function.pausingWaveFn - opVersion: '1' + opVersion: '2' opStatus: default opDef: !def enable: true @@ -19,3 +19,20 @@ opDef: !def keywords: - wave - toggle +inputs: +- !input + Localalias: lowWidthField + coordType: !coordT + Coordtypefloat: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true +- !input + Localalias: highWidthField + coordType: !coordT + Coordtypefloat: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true diff --git a/src/operators/function/pausingWaveFn_params.txt b/src/operators/function/pausingWaveFn_params.txt index e643e0383..dbacddafe 100644 --- a/src/operators/function/pausingWaveFn_params.txt +++ b/src/operators/function/pausingWaveFn_params.txt @@ -1,2 +1,3 @@ names source handling readOnlyHandling conversion enable -Lowwidth Highwidth param runtime macro 1 +Lowwidth param runtime macro op('lowWidth_definition').numRows < 2 +Highwidth param runtime macro op('highWidth_definition').numRows < 2 diff --git a/src/operators/light/multiLight.tox b/src/operators/light/multiLight.tox index c60e7d935..1ee7ed6df 100644 Binary files a/src/operators/light/multiLight.tox and b/src/operators/light/multiLight.tox differ diff --git a/src/operators/light/multiLight.yaml b/src/operators/light/multiLight.yaml index 5e8dda699..1821873c7 100644 --- a/src/operators/light/multiLight.yaml +++ b/src/operators/light/multiLight.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.light.multiLight - opVersion: '6' + opVersion: '7' opStatus: beta opDef: !def enable: true diff --git a/src/operators/light/multiLight_stepTemplate.glsl b/src/operators/light/multiLight_stepTemplate.glsl index 60a6c5ae5..dda8fae5a 100644 --- a/src/operators/light/multiLight_stepTemplate.glsl +++ b/src/operators/light/multiLight_stepTemplate.glsl @@ -1,5 +1,5 @@ #ifdef THIS_HAS_INPUT_$ -if ((i+1) == $ && THIS_Enable$ > 0.5) { +if ((i+1) == $ && THIS_Enable$ > 0.5 && THIS_Level$ > 0.) { #ifdef THIS_HAS_INPUT_bounds$ if (adaptAsFloat(inputOp_bounds$(p, ctx)) > 0.) { return res; diff --git a/src/operators/material/goochShadingContrib.tox b/src/operators/material/goochShadingContrib.tox index ba4354718..d3a5db805 100644 Binary files a/src/operators/material/goochShadingContrib.tox and b/src/operators/material/goochShadingContrib.tox differ diff --git a/src/operators/material/goochShadingContrib.yaml b/src/operators/material/goochShadingContrib.yaml index cae3e79e3..2fc2b04ef 100644 --- a/src/operators/material/goochShadingContrib.yaml +++ b/src/operators/material/goochShadingContrib.yaml @@ -1,10 +1,11 @@ !rop meta: !meta opType: raytk.operators.material.goochShadingContrib - opVersion: '13' + opVersion: '14' opStatus: default opDef: !def enable: true + useRuntimeBypass: true typeSpec: !ropTypes coordType: !coordT Coordtypevec3: true diff --git a/src/operators/material/modularMat.glsl b/src/operators/material/modularMat.glsl index a02a14c3e..c3d61958d 100644 --- a/src/operators/material/modularMat.glsl +++ b/src/operators/material/modularMat.glsl @@ -60,6 +60,9 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) { #ifdef THIS_EXPOSE_lightpos THIS_lightpos = matCtx.light.pos; #endif + #ifdef THIS_EXPOSE_sdf + THIS_sdf = matCtx.result; + #endif #ifdef THIS_EXPOSE_surfacecolor { #ifdef RAYTK_USE_SURFACE_COLOR diff --git a/src/operators/material/modularMat.tox b/src/operators/material/modularMat.tox index 98f8d33be..df73c5a4c 100644 Binary files a/src/operators/material/modularMat.tox and b/src/operators/material/modularMat.tox differ diff --git a/src/operators/material/modularMat.yaml b/src/operators/material/modularMat.yaml index 753404e81..c827eacfa 100644 --- a/src/operators/material/modularMat.yaml +++ b/src/operators/material/modularMat.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.material.modularMat - opVersion: '27' + opVersion: '28' opStatus: default opDef: !def enable: !expr diff --git a/src/operators/material/modularMat_variables.txt b/src/operators/material/modularMat_variables.txt index ec0fbb552..2634cc114 100644 --- a/src/operators/material/modularMat_variables.txt +++ b/src/operators/material/modularMat_variables.txt @@ -7,3 +7,4 @@ ao Ambient Occlusion float 1 shadedlevel Shaded Level (0: full shadow, 1: none) float 1 RAYTK_USE_SHADOW normal Surface Normal vec3 1 reflectcolor Reflection Color vec3 1 RAYTK_USE_REFLECTION +sdf SDF Surface Sdf 1 diff --git a/src/operators/opChips.txt b/src/operators/opChips.txt index 80ced1373..89927c9d3 100644 --- a/src/operators/opChips.txt +++ b/src/operators/opChips.txt @@ -1,17 +1,19 @@ name chip -adjustColor updated -archSdf updated -archSdf2d new -axisLight updated -colorRampField updated -coolSSdf2d new -crossSdf updated -helixSdf updated -hologramContrib new -knitPattern new -pointLight updated -polygonSdf2d updated -rampField updated -spiralZoom updated -stepField updated -vectorToFloat updated \ No newline at end of file +assignAttribute updated +boxSdf updated +fisheyeCamera updated +getAttribute updated +isoscelesTriangleSdf2d new +knife updated +limitField updated +modulo1D updated +modulo2D updated +modulo3D updated +modularMat updated +pausingWaveFn updated +petalSdf updated +roundedRectangleSdf2d updated +texture1dField new +variableList new +vesicaSegmentSdf new +vesicaSegmentSdf2d new \ No newline at end of file diff --git a/src/operators/output/experimentalRaymarchRender3D_body.glsl b/src/operators/output/experimentalRaymarchRender3D_body.glsl index bfdbab4ac..dd4a82291 100644 --- a/src/operators/output/experimentalRaymarchRender3D_body.glsl +++ b/src/operators/output/experimentalRaymarchRender3D_body.glsl @@ -284,10 +284,9 @@ vec4 renderSurfaceHit(Sdf res, vec3 p, MaterialContext matCtx) { matCtx.reflectColor = renderSurfaceReflection(p, matCtx); -// matCtx.refractColor = renderSurfaceRefraction(p, matCtx); + matCtx.refractColor = renderSurfaceRefraction(p, matCtx); vec3 col = getSurfaceColorAllLights(p, matCtx); - return vec4(col, 1.); } diff --git a/src/operators/output/raymarchRender3D.tox b/src/operators/output/raymarchRender3D.tox index f48edcb54..96caf8c66 100644 Binary files a/src/operators/output/raymarchRender3D.tox and b/src/operators/output/raymarchRender3D.tox differ diff --git a/src/operators/output/raymarchRender3D.yaml b/src/operators/output/raymarchRender3D.yaml index 7e94b9e0c..cc5427f1f 100644 --- a/src/operators/output/raymarchRender3D.yaml +++ b/src/operators/output/raymarchRender3D.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.output.raymarchRender3D - opVersion: '131' + opVersion: '132' opStatus: default opDef: !def enable: true diff --git a/src/operators/sdf/boxSdf.glsl b/src/operators/sdf/boxSdf.glsl index 156c53e3c..e39ef39df 100644 --- a/src/operators/sdf/boxSdf.glsl +++ b/src/operators/sdf/boxSdf.glsl @@ -7,7 +7,7 @@ ReturnT thismap(CoordT p, ContextT ctx) { Sdf res; int infAxis = int(THIS_Infiniteaxis); if (infAxis == 0) { - res = createSdf(THIS_BOX_FUNC_3D(p, scale)); + res = createSdf(fBox(p, scale)); switch (int(THIS_Uvmode)) { case THISTYPE_Uvmode_bounds: assignUV(res, map01(p, -scale/2., scale/2.)); @@ -24,6 +24,9 @@ ReturnT thismap(CoordT p, ContextT ctx) { } break; } + #ifdef RAYTK_HAS_ATTR_edgedist + res.attrs.edgedist = min(distance(abs(p.xy), scale.xy), min(distance(abs(p.zx), scale.zx), distance(abs(p.yz), scale.yz))); + #endif } else { vec2 q; vec2 s; @@ -72,13 +75,16 @@ ReturnT thismap(CoordT p, ContextT ctx) { } break; } - res = createSdf(THIS_BOX_FUNC_2D(q, s)); + res = createSdf(fBox2(q, s)); switch (THIS_Uvmode) { case THISTYPE_Uvmode_bounds: case THISTYPE_Uvmode_faces: assignUV(res, uv); break; } + #ifdef RAYTK_HAS_ATTR_edgedist + res.attrs.edgedist = distance(abs(q), s); + #endif } return res; } \ No newline at end of file diff --git a/src/operators/sdf/boxSdf.tox b/src/operators/sdf/boxSdf.tox index d7e92f031..1bafa263a 100644 Binary files a/src/operators/sdf/boxSdf.tox and b/src/operators/sdf/boxSdf.tox differ diff --git a/src/operators/sdf/boxSdf.yaml b/src/operators/sdf/boxSdf.yaml index 239a1ff1c..8b43af9da 100644 --- a/src/operators/sdf/boxSdf.yaml +++ b/src/operators/sdf/boxSdf.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.sdf.boxSdf - opVersion: '21' + opVersion: '23' opStatus: default opDef: !def enable: true @@ -14,11 +14,13 @@ opDef: !def Returntypesdf: true function: function paramGroupTable: eval_params - macroTable: !table - file: src/operators/sdf/boxSdf_macros.txt - name: macro_exprs + variableTable: !table + file: src/operators/sdf/boxSdf_variables.txt + name: variable_exprs evaluate: true - evalOpts: !evalOpts {} + evalOpts: !evalOpts + excludeFirstRow: true + cols: enable help: !text file: src/operators/sdf/boxSdf.md name: help diff --git a/src/operators/sdf/boxSdf_boxTypes.txt b/src/operators/sdf/boxSdf_boxTypes.txt deleted file mode 100644 index 2706f0f34..000000000 --- a/src/operators/sdf/boxSdf_boxTypes.txt +++ /dev/null @@ -1,3 +0,0 @@ -type func3d func2d -boxcheap fBoxCheap fBox2Cheap -box fBox fBox2 diff --git a/src/operators/sdf/boxSdf_buildOptimizedFunction.py b/src/operators/sdf/boxSdf_buildOptimizedFunction.py index 2a0ca1b8b..c3a16d475 100644 --- a/src/operators/sdf/boxSdf_buildOptimizedFunction.py +++ b/src/operators/sdf/boxSdf_buildOptimizedFunction.py @@ -19,22 +19,22 @@ def buildCode(): p = parent().par axis = p.Infiniteaxis.eval() uvMode = p.Uvmode.eval() - boxType = p.Boxtype.eval() if axis == 'none': - fn = 'fBoxCheap' if boxType == 'boxcheap' else 'fBox' - out.write(f'Sdf res = createSdf({fn}(p, scale));\n') + out.write(f'Sdf res = createSdf(fBox(p, scale));\n') if uvMode == 'bounds': out.write('assignUV(res, map01(p, -scale/2., scale/2.));\n') elif uvMode == 'faces': out.write('vec3 pNorm = p / scale;\n') out.write('vec3 boxFaces = nearestFace(pNorm);\n') - out.write('if (boxFaces.x != 0.) assignUV(res, vec3(pNorm.y * boxFaces.x, pNorm.z, 0.));') - out.write('else if (boxFaces.y != 0.) assignUV(res, vec3(pNorm.z * boxFaces.y, pNorm.x, 0.));') - out.write('else if (boxFaces.z != 0.) assignUV(res, vec3(pNorm.x * boxFaces.z, pNorm.y, 0.));') + out.write('if (boxFaces.x != 0.) assignUV(res, vec3(pNorm.y * boxFaces.x, pNorm.z, 0.));\n') + out.write('else if (boxFaces.y != 0.) assignUV(res, vec3(pNorm.z * boxFaces.y, pNorm.x, 0.));\n') + out.write('else if (boxFaces.z != 0.) assignUV(res, vec3(pNorm.x * boxFaces.z, pNorm.y, 0.));\n') + out.write('#ifdef RAYTK_HAS_ATTR_edgedist\n') + out.write('res.attrs.edgedist = min(distance(abs(p.xy), scale.xy), min(distance(abs(p.zx), scale.zx), distance(abs(p.yz), scale.yz)));\n') + out.write('#endif\n') else: - fn = 'fBox2Cheap' if boxType == 'boxcheap' else 'fBox2' swiz = {'x': 'yz', 'y': 'zx', 'z': 'xy'}[axis] - out.write(f'Sdf res = createSdf({fn}(p.{swiz}, scale.{swiz}));\n') + out.write(f'Sdf res = createSdf(fBox2(p.{swiz}, scale.{swiz}));\n') if uvMode == 'bounds': out.write('vec3 uv = map01(p, -scale/2., scale/2.);\n') out.write(f'uv.{axis} = p.{axis};\n') @@ -46,6 +46,9 @@ def buildCode(): out.write(f'if (edge.x != 0.) uv.x = pNorm.y * edge.x;\n') out.write(f'else uv.x = pNorm.x * edge.y;\n') out.write('assignUV(res, uv);\n') + out.write('#ifdef RAYTK_HAS_ATTR_edgedist\n') + out.write(f'res.attrs.edgedist = distance(abs(p.{swiz}), scale.{swiz});\n') + out.write('#endif\n') out.write('return res;\n') out.write('}\n') return out.getvalue() diff --git a/src/operators/sdf/boxSdf_macros.txt b/src/operators/sdf/boxSdf_macros.txt deleted file mode 100644 index 9c6b932d5..000000000 --- a/src/operators/sdf/boxSdf_macros.txt +++ /dev/null @@ -1,2 +0,0 @@ -not parent().par.Optimize 'THIS_BOX_FUNC_2D' op('boxTypes')[parent().par.Boxtype.eval(), 'func2d'] -not parent().par.Optimize 'THIS_BOX_FUNC_3D' op('boxTypes')[parent().par.Boxtype.eval(), 'func3d'] diff --git a/src/operators/sdf/boxSdf_variables.txt b/src/operators/sdf/boxSdf_variables.txt new file mode 100644 index 000000000..df72d6af5 --- /dev/null +++ b/src/operators/sdf/boxSdf_variables.txt @@ -0,0 +1,2 @@ +name label dataType enable macros category +edgedist Edge Distance float 1 attribute diff --git a/src/operators/sdf/index.tox b/src/operators/sdf/index.tox index fe4278d32..a142941c3 100644 Binary files a/src/operators/sdf/index.tox and b/src/operators/sdf/index.tox differ diff --git a/src/operators/sdf/petalSdf.glsl b/src/operators/sdf/petalSdf.glsl index 709d3afd0..f887d6c2a 100644 --- a/src/operators/sdf/petalSdf.glsl +++ b/src/operators/sdf/petalSdf.glsl @@ -11,15 +11,25 @@ ReturnT thismap(CoordT p, ContextT ctx) { #else float r = THIS_Radius; #endif + #ifdef THIS_HAS_INPUT_widthField + float width = inputOp_widthField(p, ctx); + #else + float width = THIS_Width; + #endif + #ifdef THIS_HAS_INPUT_wrapField + float wrap = inputOp_wrapField(p, ctx); + #else + float wrap = THIS_Wrap; + #endif pR(p.xz, THIS_Rotate); - vec3 n = normalize(vec3(1., 0., THIS_Width)); + vec3 n = normalize(vec3(1., 0., width)); float d = -dot(p, n); d = max(d, dot(p, n * vec3(1., 1., -1.))); float len = mix(PI / 1.2, PI / 2., pow(r/2.9, 2.)); - len *= THIS_Wrap; + len *= wrap; len = max(len, 0.); pR(p.yz, PI / 2. - len); d = smax(d, p.y, th); - d = smax(d, abs(length(p) - THIS_Radius) - th * th * .16, th * .16); + d = smax(d, abs(length(p) - r) - th * th * .16, th * .16); return createSdf(d); } \ No newline at end of file diff --git a/src/operators/sdf/petalSdf.tox b/src/operators/sdf/petalSdf.tox index 760b5e84f..feb18b9a4 100644 Binary files a/src/operators/sdf/petalSdf.tox and b/src/operators/sdf/petalSdf.tox differ diff --git a/src/operators/sdf/petalSdf.yaml b/src/operators/sdf/petalSdf.yaml index 330fc9a36..71c38c77b 100644 --- a/src/operators/sdf/petalSdf.yaml +++ b/src/operators/sdf/petalSdf.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.sdf.petalSdf - opVersion: '5' + opVersion: '6' opStatus: default opDef: !def enable: true @@ -37,3 +37,21 @@ inputs: Allcontexttype: true returnType: !returnT Returntypefloat: true +- !input + Localalias: widthField + Variableinputs: thicknessField radiusField + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true +- !input + Localalias: wrapField + Variableinputs: thicknessField radiusField widthField + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true diff --git a/src/operators/sdf/petalSdf_params.txt b/src/operators/sdf/petalSdf_params.txt index f14bc1977..f2017eaca 100644 --- a/src/operators/sdf/petalSdf_params.txt +++ b/src/operators/sdf/petalSdf_params.txt @@ -1,5 +1,6 @@ names source handling readOnlyHandling conversion enable -Width Wrap param runtime macro 1 +Width param runtime macro op('width_definition').numRows < 2 +Wrap param runtime macro op('wrap_definition').numRows < 2 Radius param runtime macro op('radius_definition').numRows < 2 Thickness param runtime macro op('thickness_definition').numRows < 2 Rotate param runtime macro angle 1 diff --git a/src/operators/sdf/vesicaSegmentSdf.glsl b/src/operators/sdf/vesicaSegmentSdf.glsl new file mode 100644 index 000000000..8c70b7a9c --- /dev/null +++ b/src/operators/sdf/vesicaSegmentSdf.glsl @@ -0,0 +1,44 @@ +// Vesica Segment - distance 3D by iq +// https://www.shadertoy.com/view/Ds2czG + +ReturnT thismap(CoordT p, ContextT ctx) { + #ifdef THIS_HAS_INPUT_endpoint1 + vec3 pt1 = inputOp_endpoint1(p, ctx).xyz; + #else + vec3 pt1 = THIS_Endpoint1; + #endif + #ifdef THIS_HAS_INPUT_endpoint2 + vec3 pt2 = inputOp_endpoint2(p, ctx).xyz; + #else + vec3 pt2 = THIS_Endpoint2; + #endif + #ifdef THIS_EXPOSE_normoffset + { + // Not sure if this is correct. + float d1 = length(p - pt1); + float d2 = length(p - pt2); + THIS_normoffset = saturate(d1 / (d1 + d2)); + } + #endif + float w = THIS_Radius; + #ifdef THIS_HAS_INPUT_radiusField + w *= inputOp_radiusField(p, ctx); + #endif + + p -= THIS_Translate; + + // orient and project to 2D + vec3 c = (pt1+pt2)*0.5; + float l = length(pt2-pt1); + vec3 v = (pt2-pt1)/l; + float y = dot(p-c, v); + vec2 q = vec2(length(p-c-y*v), abs(y)); + + // feature selection (vertex or body) + float r = 0.5*l; + float d = 0.5*(r*r-w*w)/w; + vec3 h = (r*q.x < d*(q.y-r)) ? vec3(0.0, r, 0.0) : vec3(-d, 0.0, d+w); + + // distance + return createSdf(length(q-h.xy) - h.z); +} \ No newline at end of file diff --git a/src/operators/sdf/vesicaSegmentSdf.tox b/src/operators/sdf/vesicaSegmentSdf.tox new file mode 100644 index 000000000..b6101aa46 Binary files /dev/null and b/src/operators/sdf/vesicaSegmentSdf.tox differ diff --git a/src/operators/sdf/vesicaSegmentSdf.yaml b/src/operators/sdf/vesicaSegmentSdf.yaml new file mode 100644 index 000000000..ca0619201 --- /dev/null +++ b/src/operators/sdf/vesicaSegmentSdf.yaml @@ -0,0 +1,53 @@ +!rop +meta: !meta + opType: raytk.operators.sdf.vesicaSegmentSdf + opVersion: '0' + opStatus: default +opDef: !def + enable: true + typeSpec: !ropTypes + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypesdf: true + function: !text + file: src/operators/sdf/vesicaSegmentSdf.glsl + name: function + paramGroupTable: eval_params + variableTable: !table + file: src/operators/sdf/vesicaSegmentSdf_variables.txt + name: variable_exprs + evaluate: true + evalOpts: !evalOpts + excludeFirstRow: true + cols: enable +inputs: +- !input + Localalias: endpoint1 + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypevec4: true +- !input + Localalias: endpoint2 + Variableinputs: endpoint1 + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypevec4: true +- !input + Localalias: radiusField + Variables: normoffset + Variableinputs: endpoint1 endpoint2 + coordType: !coordT + Coordtypevec3: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true diff --git a/src/operators/sdf/vesicaSegmentSdf_params.txt b/src/operators/sdf/vesicaSegmentSdf_params.txt new file mode 100644 index 000000000..8a5137c10 --- /dev/null +++ b/src/operators/sdf/vesicaSegmentSdf_params.txt @@ -0,0 +1,4 @@ +names source handling readOnlyHandling conversion enable +Translate[xyz] Radius param runtime macro 1 +Endpoint1[xyz] param runtime macro op('endPoint1_definition').numRows < 2 +Endpoint2[xyz] param runtime macro op('endPoint2_definition').numRows < 2 diff --git a/src/operators/sdf/vesicaSegmentSdf_variables.txt b/src/operators/sdf/vesicaSegmentSdf_variables.txt new file mode 100644 index 000000000..58b35f54b --- /dev/null +++ b/src/operators/sdf/vesicaSegmentSdf_variables.txt @@ -0,0 +1,2 @@ +name label dataType enable +normoffset Normalized Offset (0..1) float 1 diff --git a/src/operators/sdf2d/index.tox b/src/operators/sdf2d/index.tox index 0181ee650..bb9da6a91 100644 Binary files a/src/operators/sdf2d/index.tox and b/src/operators/sdf2d/index.tox differ diff --git a/src/operators/sdf2d/isoscelesTriangleSdf2d.glsl b/src/operators/sdf2d/isoscelesTriangleSdf2d.glsl new file mode 100644 index 000000000..f673a023f --- /dev/null +++ b/src/operators/sdf2d/isoscelesTriangleSdf2d.glsl @@ -0,0 +1,17 @@ +ReturnT thismap(CoordT p, ContextT ctx) { + #ifdef THIS_HAS_INPUT_heightField + float h = inputOp_heightField(p, ctx); + #else + float h = THIS_Height; + #endif + #ifdef THIS_HAS_INPUT_widthField + float w = inputOp_widthField(p, ctx); + #else + float w = THIS_Width; + #endif + DIRECTION_BODY(); + p.y *= -1.; + POSITION_BODY(); + float d = sdTriangleIsosceles(p, vec2(w, h)); + return createSdf(d); +} \ No newline at end of file diff --git a/src/operators/sdf2d/isoscelesTriangleSdf2d.tox b/src/operators/sdf2d/isoscelesTriangleSdf2d.tox new file mode 100644 index 000000000..c9ae44fea Binary files /dev/null and b/src/operators/sdf2d/isoscelesTriangleSdf2d.tox differ diff --git a/src/operators/sdf2d/isoscelesTriangleSdf2d.yaml b/src/operators/sdf2d/isoscelesTriangleSdf2d.yaml new file mode 100644 index 000000000..65c46b280 --- /dev/null +++ b/src/operators/sdf2d/isoscelesTriangleSdf2d.yaml @@ -0,0 +1,69 @@ +!rop +meta: !meta + opType: raytk.operators.sdf2d.isoscelesTriangleSdf2d + opVersion: '0' + opStatus: default +opDef: !def + enable: true + typeSpec: !ropTypes + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypesdf: true + function: !text + file: src/operators/sdf2d/isoscelesTriangleSdf2d.glsl + name: function + paramGroupTable: eval_params + libraryNames: !expr + expr: op('triangleSdf2d_lib') +inputs: +- !input + Localalias: heightField + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true +- !input + Localalias: widthField + Variableinputs: heightField + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true +elements: +- !opElement + name: codeSwitcher_Direction + elementType: codeSwitcher + params: + Elementroot: '' + Table: !table + file: src/operators/sdf2d/triangleSdf2d_directions.txt + name: directions + Param: Direction + Autoupdateparams: true + Manageparamstates: false + Alwaysincludeallparams: false + Switchmode: auto + Indexexpr: '' + Placeholder: DIRECTION_BODY(); +- !opElement + name: codeSwitcher_Positionmode + elementType: codeSwitcher + params: + Elementroot: '' + Table: !table + file: src/operators/sdf2d/isoscelesTriangleSdf2d_positionModes.txt + name: positionModes + Param: Positionmode + Autoupdateparams: true + Manageparamstates: false + Alwaysincludeallparams: false + Switchmode: auto + Indexexpr: '' + Placeholder: POSITION_BODY(); diff --git a/src/operators/sdf2d/isoscelesTriangleSdf2d_params.txt b/src/operators/sdf2d/isoscelesTriangleSdf2d_params.txt new file mode 100644 index 000000000..229a2d82b --- /dev/null +++ b/src/operators/sdf2d/isoscelesTriangleSdf2d_params.txt @@ -0,0 +1,3 @@ +names source handling readOnlyHandling conversion enable +Height param runtime macro op('height_definition').numRows < 2 +Width param runtime macro op('width_definition').numRows < 2 diff --git a/src/operators/sdf2d/isoscelesTriangleSdf2d_positionModes.txt b/src/operators/sdf2d/isoscelesTriangleSdf2d_positionModes.txt new file mode 100644 index 000000000..e35e3fa1f --- /dev/null +++ b/src/operators/sdf2d/isoscelesTriangleSdf2d_positionModes.txt @@ -0,0 +1,3 @@ +name label code +base Base Centered p.y += h; +tip Tip Centered diff --git a/src/operators/sdf2d/lineSegmentSdf2d.tox b/src/operators/sdf2d/lineSegmentSdf2d.tox index 32cdf18ec..01b6a10d8 100644 Binary files a/src/operators/sdf2d/lineSegmentSdf2d.tox and b/src/operators/sdf2d/lineSegmentSdf2d.tox differ diff --git a/src/operators/sdf2d/lineSegmentSdf2d.yaml b/src/operators/sdf2d/lineSegmentSdf2d.yaml index 610b83ee2..48835a6b2 100644 --- a/src/operators/sdf2d/lineSegmentSdf2d.yaml +++ b/src/operators/sdf2d/lineSegmentSdf2d.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.sdf2d.lineSegmentSdf2d - opVersion: '9' + opVersion: '10' opStatus: default opDef: !def enable: true diff --git a/src/operators/sdf2d/lineSegmentSdf2d_params.txt b/src/operators/sdf2d/lineSegmentSdf2d_params.txt index 4840ec311..b117350e0 100644 --- a/src/operators/sdf2d/lineSegmentSdf2d_params.txt +++ b/src/operators/sdf2d/lineSegmentSdf2d_params.txt @@ -1,3 +1,4 @@ names source handling readOnlyHandling conversion enable -Pointa[xy] Pointb[xy] param runtime macro op('points_definition').numRows < 2 +Pointa[xy] param runtime macro op('point1_definition').numRows < 2 +Pointb[xy] param runtime macro op('point2_definition').numRows < 2 Thickness param runtime macro op('thickness_definition').numRows < 2 diff --git a/src/operators/sdf2d/roundedRectangleSdf2d.glsl b/src/operators/sdf2d/roundedRectangleSdf2d.glsl index 7a9b256a7..928773743 100644 --- a/src/operators/sdf2d/roundedRectangleSdf2d.glsl +++ b/src/operators/sdf2d/roundedRectangleSdf2d.glsl @@ -7,6 +7,7 @@ ReturnT thismap(CoordT p, ContextT ctx) { #ifdef THIS_HAS_INPUT_roundingField r *= inputOp_roundingField(p, ctx); #endif + ROUNDNESS_UNIT_BODY(); ReturnT res = createSdf(sdRoundedBox(p, s, r)); #ifdef RAYTK_USE_UV assignUV(res, vec3(map01(p, -s/2., s/2.), 0.)); diff --git a/src/operators/sdf2d/roundedRectangleSdf2d.tox b/src/operators/sdf2d/roundedRectangleSdf2d.tox index ac004f7c3..b1e33ce3b 100644 Binary files a/src/operators/sdf2d/roundedRectangleSdf2d.tox and b/src/operators/sdf2d/roundedRectangleSdf2d.tox differ diff --git a/src/operators/sdf2d/roundedRectangleSdf2d.yaml b/src/operators/sdf2d/roundedRectangleSdf2d.yaml index baadcc105..e7b8f4506 100644 --- a/src/operators/sdf2d/roundedRectangleSdf2d.yaml +++ b/src/operators/sdf2d/roundedRectangleSdf2d.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.sdf2d.roundedRectangleSdf2d - opVersion: '8' + opVersion: '9' opStatus: default opDef: !def enable: true @@ -39,3 +39,19 @@ inputs: returnType: !returnT Returntypefloat: true Returntypevec4: true +elements: +- !opElement + name: codeSwitcher_Roundnessunit + elementType: codeSwitcher + params: + Elementroot: '' + Table: !table + file: src/operators/sdf2d/roundedRectangleSdf2d_roundnessUnits.txt + name: roundnessUnits + Param: Roundnessunit + Autoupdateparams: true + Manageparamstates: false + Alwaysincludeallparams: false + Switchmode: inline + Indexexpr: '' + Placeholder: ROUNDNESS_UNIT_BODY(); diff --git a/src/operators/sdf2d/roundedRectangleSdf2d_roundnessUnits.txt b/src/operators/sdf2d/roundedRectangleSdf2d_roundnessUnits.txt new file mode 100644 index 000000000..1b1ec56cf --- /dev/null +++ b/src/operators/sdf2d/roundedRectangleSdf2d_roundnessUnits.txt @@ -0,0 +1,3 @@ +name label code +dist Distance +ratio Ratio of Scale r *= vmin(s); diff --git a/src/operators/sdf2d/vesicaSegmentSdf2d.glsl b/src/operators/sdf2d/vesicaSegmentSdf2d.glsl new file mode 100644 index 000000000..18baeb74e --- /dev/null +++ b/src/operators/sdf2d/vesicaSegmentSdf2d.glsl @@ -0,0 +1,43 @@ +// Vesica Segment - distance 2D by iq +// https://www.shadertoy.com/view/cs2yzG + +ReturnT thismap(CoordT p, ContextT ctx) { + #ifdef THIS_HAS_INPUT_point1Field + vec2 a = inputOp_point1Field(p, ctx).xy; + #else + vec2 a = THIS_Pointa; + #endif + #ifdef THIS_HAS_INPUT_point2Field + vec2 b = inputOp_point2Field(p, ctx).xy; + #else + vec2 b = THIS_Pointb; + #endif + #ifdef THIS_EXPOSE_normoffset + { + vec2 pa = p-a, ba = b-a; + // Not sure if this is correct. + float d1 = length(ba); + float d2 = length(pa); + THIS_normoffset = saturate(d1 / (d1 + d2)); + } + #endif + #ifdef THIS_HAS_INPUT_thicknessField + float w = inputOp_thicknessField(p, ctx); + #else + float w = THIS_Thickness; + #endif + // shape constants + float r = 0.5*length(b-a); + float d = 0.5*(r*r-w*w)/w; + + // center, orient and mirror + vec2 v = (b-a)/r; + vec2 c = (b+a)*0.5; + vec2 q = 0.5*abs(mat2(v.y,v.x,-v.x,v.y)*(p-c)); + + // feature selection (vertex or body) + vec3 h = (r*q.x < d*(q.y-r)) ? vec3(0.0,r,0.0) : vec3(-d,0.0,d+w); + + // distance + return createSdf(length(q-h.xy) - h.z); +} \ No newline at end of file diff --git a/src/operators/sdf2d/vesicaSegmentSdf2d.tox b/src/operators/sdf2d/vesicaSegmentSdf2d.tox new file mode 100644 index 000000000..c743e9af9 Binary files /dev/null and b/src/operators/sdf2d/vesicaSegmentSdf2d.tox differ diff --git a/src/operators/sdf2d/vesicaSegmentSdf2d.yaml b/src/operators/sdf2d/vesicaSegmentSdf2d.yaml new file mode 100644 index 000000000..3c001f9b1 --- /dev/null +++ b/src/operators/sdf2d/vesicaSegmentSdf2d.yaml @@ -0,0 +1,53 @@ +!rop +meta: !meta + opType: raytk.operators.sdf2d.vesicaSegmentSdf2d + opVersion: '0' + opStatus: default +opDef: !def + enable: true + typeSpec: !ropTypes + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypesdf: true + function: !text + file: src/operators/sdf2d/vesicaSegmentSdf2d.glsl + name: function + paramGroupTable: eval_params + variableTable: !table + file: src/operators/sdf2d/vesicaSegmentSdf2d_variables.txt + name: variable_exprs + evaluate: true + evalOpts: !evalOpts + excludeFirstRow: true + cols: enable +inputs: +- !input + Localalias: point1Field + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypevec4: true +- !input + Localalias: point2Field + Variableinputs: point1Field + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypevec4: true +- !input + Localalias: thicknessField + Variables: normoffset + Variableinputs: point1Field point2Field + coordType: !coordT + Coordtypevec2: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Returntypefloat: true diff --git a/src/operators/sdf2d/vesicaSegmentSdf2d_params.txt b/src/operators/sdf2d/vesicaSegmentSdf2d_params.txt new file mode 100644 index 000000000..b117350e0 --- /dev/null +++ b/src/operators/sdf2d/vesicaSegmentSdf2d_params.txt @@ -0,0 +1,4 @@ +names source handling readOnlyHandling conversion enable +Pointa[xy] param runtime macro op('point1_definition').numRows < 2 +Pointb[xy] param runtime macro op('point2_definition').numRows < 2 +Thickness param runtime macro op('thickness_definition').numRows < 2 diff --git a/src/operators/sdf2d/vesicaSegmentSdf2d_variables.txt b/src/operators/sdf2d/vesicaSegmentSdf2d_variables.txt new file mode 100644 index 000000000..58b35f54b --- /dev/null +++ b/src/operators/sdf2d/vesicaSegmentSdf2d_variables.txt @@ -0,0 +1,2 @@ +name label dataType enable +normoffset Normalized Offset (0..1) float 1 diff --git a/src/operators/utility/defineAttribute.tox b/src/operators/utility/defineAttribute.tox deleted file mode 100644 index 5047d0a34..000000000 Binary files a/src/operators/utility/defineAttribute.tox and /dev/null differ diff --git a/src/operators/utility/defineAttribute.yaml b/src/operators/utility/defineAttribute.yaml deleted file mode 100644 index 9981bc0f4..000000000 --- a/src/operators/utility/defineAttribute.yaml +++ /dev/null @@ -1,5 +0,0 @@ -!rcomp -meta: !meta - opType: raytk.operators.utility.defineAttribute - opVersion: '0' - opStatus: alpha diff --git a/src/operators/utility/defineAttribute_dataTypes.txt b/src/operators/utility/defineAttribute_dataTypes.txt deleted file mode 100644 index 69bb3acc3..000000000 --- a/src/operators/utility/defineAttribute_dataTypes.txt +++ /dev/null @@ -1,3 +0,0 @@ -name label -float Float -vec4 Vector diff --git a/src/operators/utility/getAttribute.glsl b/src/operators/utility/getAttribute.glsl index 924a4a196..be5116a5a 100644 --- a/src/operators/utility/getAttribute.glsl +++ b/src/operators/utility/getAttribute.glsl @@ -1,6 +1,6 @@ ReturnT thismap(CoordT p, ContextT ctx) { ReturnT res; - #ifndef THIS_ATTR_EXISTS + #ifndef THIS_HAS_ATTR res = ReturnT(0.); #else { diff --git a/src/operators/utility/getAttribute.tox b/src/operators/utility/getAttribute.tox index bcd985a14..d955152b6 100644 Binary files a/src/operators/utility/getAttribute.tox and b/src/operators/utility/getAttribute.tox differ diff --git a/src/operators/utility/getAttribute.yaml b/src/operators/utility/getAttribute.yaml index d7e7e4b35..5fdbf6df5 100644 --- a/src/operators/utility/getAttribute.yaml +++ b/src/operators/utility/getAttribute.yaml @@ -1,8 +1,8 @@ !rop meta: !meta opType: raytk.operators.utility.getAttribute - opVersion: '1' - opStatus: alpha + opVersion: '4' + opStatus: beta opDef: !def enable: true typeSpec: !ropTypes @@ -27,6 +27,13 @@ opDef: !def name: macro_exprs evaluate: true evalOpts: !evalOpts {} + referenceTable: !table + file: src/operators/utility/getAttribute_references.txt + name: reference_exprs + evaluate: true + evalOpts: !evalOpts + excludeFirstRow: true + cols: dataType sourceName inputs: - !input Localalias: sdf diff --git a/src/operators/utility/getAttribute_references.txt b/src/operators/utility/getAttribute_references.txt new file mode 100644 index 000000000..4fd8f814d --- /dev/null +++ b/src/operators/utility/getAttribute_references.txt @@ -0,0 +1,2 @@ +name dataType sourcePath sourceName enable category +attr parent().par.Datatype parent().par.Attributename 1 attribute diff --git a/src/operators/utility/index.tox b/src/operators/utility/index.tox index 7592d5418..a5e577780 100644 Binary files a/src/operators/utility/index.tox and b/src/operators/utility/index.tox differ diff --git a/src/operators/utility/lfoGenerator.tox b/src/operators/utility/lfoGenerator.tox index beda0b30f..219d6013e 100644 Binary files a/src/operators/utility/lfoGenerator.tox and b/src/operators/utility/lfoGenerator.tox differ diff --git a/src/operators/utility/lfoGenerator.yaml b/src/operators/utility/lfoGenerator.yaml index a9d7e2ed4..a7113ff6d 100644 --- a/src/operators/utility/lfoGenerator.yaml +++ b/src/operators/utility/lfoGenerator.yaml @@ -1,5 +1,5 @@ !rcomp meta: !meta opType: raytk.operators.utility.lfoGenerator - opVersion: '5' + opVersion: '6' opStatus: beta diff --git a/src/operators/utility/variableList.glsl b/src/operators/utility/variableList.glsl new file mode 100644 index 000000000..12a24cb71 --- /dev/null +++ b/src/operators/utility/variableList.glsl @@ -0,0 +1,3 @@ +ReturnT thismap(CoordT p, ContextT ctx) { + return inputOp1(p, ctx); +} \ No newline at end of file diff --git a/src/operators/utility/variableList.tox b/src/operators/utility/variableList.tox new file mode 100644 index 000000000..42553afb4 Binary files /dev/null and b/src/operators/utility/variableList.tox differ diff --git a/src/operators/utility/variableList.yaml b/src/operators/utility/variableList.yaml new file mode 100644 index 000000000..132d97be0 --- /dev/null +++ b/src/operators/utility/variableList.yaml @@ -0,0 +1,144 @@ +!rop +meta: !meta + opType: raytk.operators.utility.variableList + opVersion: '0' + opStatus: beta +opDef: !def + enable: true + typeSpec: !ropTypes + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: true + function: function + variableTable: !table + file: src/operators/utility/variableList_variables.txt + name: variable_exprs + evaluate: true + evalOpts: !evalOpts + excludeFirstRow: true + displayCategory: Variable +multiInput: !multiInput + Minimuminputs: 1 + Coordtypereductionmode: common + Coordtypereductionscope: '*' + Contexttypereductionmode: common + Contexttypereductionscope: '*' + Returntypereductionmode: none + Returntypereductionscope: '*' + inputs: + - !input + Localalias: output + Variables: '*' + Variableinputs: '*' + Required: true + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: true + - !input + Localalias: variable1 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype1 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable2 + Variables: !expr + expr: parent().par.Name1 + Variableinputs: variable1 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype2 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable3 + Variables: !expr + expr: parent().pars('Name[1-2]') + Variableinputs: variable1 variable2 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype3 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable4 + Variables: !expr + expr: parent().pars('Name[1-3]') + Variableinputs: variable1 variable2 variable3 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype4 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable5 + Variables: !expr + expr: parent().pars('Name[1-4]') + Variableinputs: variable1 variable2 variable3 variable4 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype5 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable6 + Variables: !expr + expr: parent().pars('Name[1-5]') + Variableinputs: variable1 variable2 variable3 variable4 variable5 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype6 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true + - !input + Localalias: variable7 + Variables: !expr + expr: parent().pars('Name[1-6]') + Variableinputs: variable1 variable2 variable3 variable4 variable5 variable6 + coordType: !coordT + Allcoordtype: true + contextType: !contextT + Allcontexttype: true + returnType: !returnT + Allreturntype: !expr + expr: parent().par.Datatype7 == 'auto' + Returntypesdf: true + Returntypefloat: true + Returntypevec4: true diff --git a/src/operators/utility/variableList_buildFunction.py b/src/operators/utility/variableList_buildFunction.py new file mode 100644 index 000000000..1ff6f9715 --- /dev/null +++ b/src/operators/utility/variableList_buildFunction.py @@ -0,0 +1,23 @@ +from io import StringIO + +# noinspection PyUnreachableCode +if False: + # noinspection PyUnresolvedReferences + from _stubs import * + +def onCook(dat: 'scriptDAT'): + dat.clear() + varTable = op('eval_variables') + out = StringIO() + out.write('ReturnT thismap(CoordT p, ContextT ctx) {\n') + for i in range(1, 8): + if varTable[i, 'enable'] != '1': + continue + varName = varTable[i, 'name'].val + out.write(f' #ifdef THIS_EXPOSE_{varName}\n') + out.write(f' THIS_{varName} = THIS_{varName}_asVarT(inputOp_variable{i}(p, ctx));\n') + out.write(' #endif\n') + pass + out.write(' return inputOp_output(p, ctx);\n') + out.write('}\n') + dat.write(out.getvalue()) diff --git a/src/operators/utility/variableList_stepTemplate.glsl b/src/operators/utility/variableList_stepTemplate.glsl new file mode 100644 index 000000000..89dcbad13 --- /dev/null +++ b/src/operators/utility/variableList_stepTemplate.glsl @@ -0,0 +1 @@ +case $: res = THIS_asReturnT(inputOp$(p, ctx)); break; \ No newline at end of file diff --git a/src/operators/utility/variableList_variables.txt b/src/operators/utility/variableList_variables.txt new file mode 100644 index 000000000..24c7a2b5c --- /dev/null +++ b/src/operators/utility/variableList_variables.txt @@ -0,0 +1,8 @@ +name label dataType enable +parent().par.Name1 or 'var1' parent().par.Name1 or 'var1' op('variable1_definition')[1, 'returnType'] or '' int(op('variable1_definition').numRows > 1) +parent().par.Name2 or 'var2' parent().par.Name2 or 'var2' op('variable2_definition')[1, 'returnType'] or '' int(op('variable2_definition').numRows > 1) +parent().par.Name3 or 'var3' parent().par.Name3 or 'var3' op('variable3_definition')[1, 'returnType'] or '' int(op('variable3_definition').numRows > 1) +parent().par.Name4 or 'var4' parent().par.Name4 or 'var4' op('variable4_definition')[1, 'returnType'] or '' int(op('variable4_definition').numRows > 1) +parent().par.Name5 or 'var5' parent().par.Name5 or 'var5' op('variable5_definition')[1, 'returnType'] or '' int(op('variable5_definition').numRows > 1) +parent().par.Name6 or 'var6' parent().par.Name6 or 'var6' op('variable6_definition')[1, 'returnType'] or '' int(op('variable6_definition').numRows > 1) +parent().par.Name7 or 'var7' parent().par.Name7 or 'var7' op('variable7_definition')[1, 'returnType'] or '' int(op('variable7_definition').numRows > 1) diff --git a/src/operators/utility/variableReference.tox b/src/operators/utility/variableReference.tox index a9b099e87..3c4e33e7a 100644 Binary files a/src/operators/utility/variableReference.tox and b/src/operators/utility/variableReference.tox differ diff --git a/src/operators/utility/variableReference.yaml b/src/operators/utility/variableReference.yaml index 2099dfdce..858aab339 100644 --- a/src/operators/utility/variableReference.yaml +++ b/src/operators/utility/variableReference.yaml @@ -1,7 +1,7 @@ !rop meta: !meta opType: raytk.operators.utility.variableReference - opVersion: '19' + opVersion: '20' opStatus: default opDef: !def enable: !expr diff --git a/src/raytk.tox b/src/raytk.tox index 87c1dc095..c3bd6fc3a 100644 Binary files a/src/raytk.tox and b/src/raytk.tox differ diff --git a/src/tools/editorTools/editorActions.py b/src/tools/editorTools/editorActions.py index f34824d7b..a714eafe5 100644 --- a/src/tools/editorTools/editorActions.py +++ b/src/tools/editorTools/editorActions.py @@ -89,18 +89,19 @@ def _loadTypeFields(): _typeFields = _loadTypeFields() +def _getStateField(primaryOp: 'OP', fieldName: str): + opState = ROPState(primaryOp) + if not opState: + return None + stateText = opState.info.opStateText + if not stateText: + return None + stateObj = json.loads(stateText) + return stateObj.get(fieldName) + def _createVarRefGroup(text: str): def getVariableObjs(ctx: ActionContext) -> List[dict]: - opState = ROPState(ctx.primaryOp) - if not opState: - return [] - stateText = opState.info.opStateText - if not stateText: - return [] - stateObj = json.loads(stateText) - if not stateObj.get('variables'): - return [] - return stateObj.get('variables') + return _getStateField(ctx.primaryOp, 'variables') or [] def isValid(ctx: ActionContext) -> bool: return bool(getVariableObjs(ctx)) @@ -128,6 +129,34 @@ def getActions(ctx: ActionContext) -> List[Action]: return actions return SimpleGroup(text, isValid, getActions) +def _createAttrRefGroup(text: str): + def test(o: 'OP'): + info = ROPInfo(o) + if not info or info.opType == _RopTypes.assignAttribute: + return False + return bool(_getStateField(o, 'attributes')) + class _LockPars(OpInit): + def init(self, o: 'COMP', ctx: ActionContext): + o.par.Attributename.readOnly = True + o.par.Datatype.readOnly = True + select = RopSelect(test=test) + def getActions(ctx: ActionContext) -> List[Action]: + return [ + ActionImpl( + attributeObj.get('label') or attributeObj.get('name'), + ropType=_RopTypes.getAttribute, + select=select, + params={'Attributename': attributeObj['name'], 'Datatype': attributeObj['dataType']}, + inits=[_LockPars()] + ) + for attributeObj in _getStateField(ctx.primaryOp, 'attributes') or [] + ] + return GroupImpl( + text, + select=select, + actions=getActions + ) + def _createRenderSelAction(label: str, name: str, enablePar: str): def execute(ctx: ActionContext): def init(refOp: 'COMP'): @@ -199,13 +228,23 @@ def getActions(ctx: ActionContext) -> List[Action]: InitSetParamOnPrimaryRop('Enablestepoutput', True), ] ), + ActionImpl( + 'World Position Map', + ropType='raytk.operators.post.worldPosMap', + select=RopSelect(ropTypes=[_RopTypes.raymarchRender3d]), + attach=AttachOutputSelector(), + inits=[ + InitLinkPrimaryToParam('Outputop'), + InitSetParamOnPrimaryRop('Enableworldposoutput', True), + ] + ), ] for i in range(1, table.numRows): if table[i, 'available'] == 'False': continue name = str(table[i, 'name']) label = str(table[i, 'label']) - if name in ('depthOut', 'objectIdOut', 'nearHitOut', 'stepsOut'): + if name in ('depthOut', 'objectIdOut', 'nearHitOut', 'stepsOut', 'worldPosOut'): label += ' (Raw)' actions.append( _createRenderSelAction(label, name, str(table[i, 'enablePar'] or '')) @@ -331,6 +370,8 @@ def execute(ctx: ActionContext): if isinstance(parOrTuplet, Par): suffix = parOrTuplet.name.replace(parOrTuplet.tupletName, '').upper() text = f'{parOrTuplet.label} ({suffix})' + if len(parOrTuplet.tuplet) > 1: + text = ' ' + text else: text = parOrTuplet[0].label return SimpleAction(text, execute=execute, isValid=None) @@ -422,6 +463,7 @@ class _InitRescale(OpInit): def init(self, o: 'COMP', ctx: ActionContext): newRescale = o origRescale = ctx.primaryComp + _copyParState(origRescale.par.Enable, newRescale.par.Enable) _copyParState(origRescale.par.Inputlow1, newRescale.par.Inputrange1) _copyParState(origRescale.par.Inputhigh1, newRescale.par.Inputrange2) _copyParState(origRescale.par.Outputlow1, newRescale.par.Outputrange1) @@ -440,6 +482,38 @@ def init(self, o: 'COMP', ctx: ActionContext): inits=[_InitRescale()], ) +def _createSimplifyRotateAction(text): + def _validateAndGetAxis(origRotate: 'OP'): + if origRotate.par['Rotatemode'] != 'axis': + return None + if origRotate.par['Usepivot']: + return None + axisParts = float(origRotate.par['Axisx'] or 0), float(origRotate.par['Axisy'] or 0), float(origRotate.par['Axisz'] or 0) + if axisParts == (1, 0, 0): + return 'x' + if axisParts == (0, 1, 0): + return 'y' + if axisParts == (0, 0, 1): + return 'z' + def _isValid(origRotate: 'OP'): + return _validateAndGetAxis(origRotate) is not None + class _InitRotate(OpInit): + def init(self, o: 'COMP', ctx: ActionContext): + newRotate = o + origRotate = ctx.primaryComp + axis = _validateAndGetAxis(origRotate) + _copyParState(origRotate.par.Enable, newRotate.par.Enable) + newRotate.par.Axis = axis + _copyParState(origRotate.par.Rotate, newRotate.par.Rotate) + origRotate.destroy() + return ActionImpl( + text, + ropType='raytk.operators.filter.axisRotate', + select=RopSelect(ropTypes=['raytk.operators.filter.rotate'], test=_isValid), + attach=AttachReplacement(), + inits=[_InitRotate()], + ) + def _copyParState(fromPar: 'Par', toPar: 'Par'): toPar.val = fromPar.val toPar.expr = fromPar.expr or '' @@ -572,6 +646,8 @@ class _RopTypes: vectorToFloat = 'raytk.operators.convert.vectorToFloat' variableReference = 'raytk.operators.utility.variableReference' defineAttribute = 'raytk.operators.utility.defineAttribute' + assignAttribute = 'raytk.operators.filter.assignAttribute' + getAttribute = 'raytk.operators.utility.getAttribute' def createActionManager(): manager = ActionManager( @@ -739,6 +815,11 @@ def createActionManager(): returnTypes=['Light'], multi=True, minCount=True, maxCount=None), attach=AttachOutFromExisting()), + ActionImpl( + 'Start custom transform', + ropType='raytk.operators.field.positionField', + select=RopSelect(ropTypes=['raytk.operators.filter.iteratedTransform']), + attach=AttachIntoExisting(inputIndex=4)), _createVarRefGroup('Reference Variable'), _createRenderSelGroup('Select Output Buffer'), _createAnimateParamsGroup( @@ -763,25 +844,19 @@ def createActionManager(): _createSwapOrderAction('Swap Chain Order'), ActionImpl( 'Assign Attribute', - ropType='raytk.operators.filter.assignAttribute', - select=RopSelect(ropTypes=[_RopTypes.defineAttribute]), + ropType=_RopTypes.assignAttribute, + select=RopSelect(ropTypes=[_RopTypes.getAttribute]), inits=[ InitBindParamsToPrimary({'Attributename': 'Attributename', 'Datatype': 'Datatype'}), ]), ActionImpl( 'Reference Attribute', - ropType='raytk.operators.utility.getAttribute', - select=RopSelect(ropTypes=[_RopTypes.defineAttribute]), + ropType=_RopTypes.getAttribute, + select=RopSelect(ropTypes=[_RopTypes.assignAttribute]), inits=[ InitBindParamsToPrimary({'Attributename': 'Attributename', 'Datatype': 'Datatype'}), ]), - ActionImpl( - 'Add Attribute', - ropType=_RopTypes.defineAttribute, - select=RopSelect(ropTypes=[_RopTypes.raymarchRender3d]), - inits=[ - InitAddToParamOnPrimaryRop('Attributedefinitions'), - ], - params={'Attributename': 'attr1'}), + _createAttrRefGroup('Reference Attribute'), + _createSimplifyRotateAction('Simplify Rotate'), ) return manager diff --git a/src/tools/inspector/inspector.tox b/src/tools/inspector/inspector.tox index f1a8a6d5a..abdcf3129 100644 Binary files a/src/tools/inspector/inspector.tox and b/src/tools/inspector/inspector.tox differ diff --git a/src/tools/inspector/shaderPanel/shaderPanel.tox b/src/tools/inspector/shaderPanel/shaderPanel.tox index e56babe7f..5e6df682a 100644 Binary files a/src/tools/inspector/shaderPanel/shaderPanel.tox and b/src/tools/inspector/shaderPanel/shaderPanel.tox differ diff --git a/tests/testCases/operators/camera/basicCamera_test.png b/tests/testCases/operators/camera/basicCamera_test.png index e778d0a27..aa99b97e6 100644 Binary files a/tests/testCases/operators/camera/basicCamera_test.png and b/tests/testCases/operators/camera/basicCamera_test.png differ diff --git a/tests/testCases/operators/camera/fisheyeCamera_test.png b/tests/testCases/operators/camera/fisheyeCamera_test.png index 3383844fe..c0e9c626e 100644 Binary files a/tests/testCases/operators/camera/fisheyeCamera_test.png and b/tests/testCases/operators/camera/fisheyeCamera_test.png differ diff --git a/tests/testCases/operators/camera/fisheyeCamera_test.tox b/tests/testCases/operators/camera/fisheyeCamera_test.tox index 1e5251d5b..9df1be3cc 100644 Binary files a/tests/testCases/operators/camera/fisheyeCamera_test.tox and b/tests/testCases/operators/camera/fisheyeCamera_test.tox differ diff --git a/tests/testCases/operators/camera/lookAtCamera_test.png b/tests/testCases/operators/camera/lookAtCamera_test.png index b15c1c099..7835686ac 100644 Binary files a/tests/testCases/operators/camera/lookAtCamera_test.png and b/tests/testCases/operators/camera/lookAtCamera_test.png differ diff --git a/tests/testCases/operators/camera/splitCamera_test.png b/tests/testCases/operators/camera/splitCamera_test.png index 6115755da..e8d218adc 100644 Binary files a/tests/testCases/operators/camera/splitCamera_test.png and b/tests/testCases/operators/camera/splitCamera_test.png differ diff --git a/tests/testCases/operators/combine/compositeFields_context_test.png b/tests/testCases/operators/combine/compositeFields_context_test.png index 443a7b725..09c6f0b56 100644 Binary files a/tests/testCases/operators/combine/compositeFields_context_test.png and b/tests/testCases/operators/combine/compositeFields_context_test.png differ diff --git a/tests/testCases/operators/combine/edgeCombine_test.png b/tests/testCases/operators/combine/edgeCombine_test.png index 98323bf72..b45569a62 100644 Binary files a/tests/testCases/operators/combine/edgeCombine_test.png and b/tests/testCases/operators/combine/edgeCombine_test.png differ diff --git a/tests/testCases/operators/combine/iterationSwitch_material_test.png b/tests/testCases/operators/combine/iterationSwitch_material_test.png index 23b6ba53b..2133fd93f 100644 Binary files a/tests/testCases/operators/combine/iterationSwitch_material_test.png and b/tests/testCases/operators/combine/iterationSwitch_material_test.png differ diff --git a/tests/testCases/operators/combine/iterationSwitch_test.png b/tests/testCases/operators/combine/iterationSwitch_test.png index ddd5fbb22..28a30f896 100644 Binary files a/tests/testCases/operators/combine/iterationSwitch_test.png and b/tests/testCases/operators/combine/iterationSwitch_test.png differ diff --git a/tests/testCases/operators/combine/layoutGrid_test.png b/tests/testCases/operators/combine/layoutGrid_test.png index 93f29cec6..0aab0913e 100644 Binary files a/tests/testCases/operators/combine/layoutGrid_test.png and b/tests/testCases/operators/combine/layoutGrid_test.png differ diff --git a/tests/testCases/operators/combine/simpleDiff_test.png b/tests/testCases/operators/combine/simpleDiff_test.png index 74bb81898..2cb2a3b2b 100644 Binary files a/tests/testCases/operators/combine/simpleDiff_test.png and b/tests/testCases/operators/combine/simpleDiff_test.png differ diff --git a/tests/testCases/operators/combine/simpleUnion_test.png b/tests/testCases/operators/combine/simpleUnion_test.png index 5add75120..e9506761c 100644 Binary files a/tests/testCases/operators/combine/simpleUnion_test.png and b/tests/testCases/operators/combine/simpleUnion_test.png differ diff --git a/tests/testCases/operators/combine/switch_camera_test.png b/tests/testCases/operators/combine/switch_camera_test.png index b737fb5b5..a09bc1818 100644 Binary files a/tests/testCases/operators/combine/switch_camera_test.png and b/tests/testCases/operators/combine/switch_camera_test.png differ diff --git a/tests/testCases/operators/combine/switch_light_test.png b/tests/testCases/operators/combine/switch_light_test.png index e191e0c3a..e48b71e07 100644 Binary files a/tests/testCases/operators/combine/switch_light_test.png and b/tests/testCases/operators/combine/switch_light_test.png differ diff --git a/tests/testCases/operators/combine/switch_test.png b/tests/testCases/operators/combine/switch_test.png index b4cdd2219..3f6449e9b 100644 Binary files a/tests/testCases/operators/combine/switch_test.png and b/tests/testCases/operators/combine/switch_test.png differ diff --git a/tests/testCases/operators/convert/floatToSdf_test.png b/tests/testCases/operators/convert/floatToSdf_test.png index 7ed060381..cd765d7eb 100644 Binary files a/tests/testCases/operators/convert/floatToSdf_test.png and b/tests/testCases/operators/convert/floatToSdf_test.png differ diff --git a/tests/testCases/operators/convert/floatToVector_test.png b/tests/testCases/operators/convert/floatToVector_test.png index 4f7011724..cb7cdeacd 100644 Binary files a/tests/testCases/operators/convert/floatToVector_test.png and b/tests/testCases/operators/convert/floatToVector_test.png differ diff --git a/tests/testCases/operators/convert/projectPolar_test.png b/tests/testCases/operators/convert/projectPolar_test.png index 4e63929ef..7b11fae04 100644 Binary files a/tests/testCases/operators/convert/projectPolar_test.png and b/tests/testCases/operators/convert/projectPolar_test.png differ diff --git a/tests/testCases/operators/field/axisDistanceField_test.png b/tests/testCases/operators/field/axisDistanceField_test.png index a4fe7e538..43b641825 100644 Binary files a/tests/testCases/operators/field/axisDistanceField_test.png and b/tests/testCases/operators/field/axisDistanceField_test.png differ diff --git a/tests/testCases/operators/field/chopField_coordMode_test.png b/tests/testCases/operators/field/chopField_coordMode_test.png index d5e60f613..d3c5cff87 100644 Binary files a/tests/testCases/operators/field/chopField_coordMode_test.png and b/tests/testCases/operators/field/chopField_coordMode_test.png differ diff --git a/tests/testCases/operators/field/colorRampField_test.png b/tests/testCases/operators/field/colorRampField_test.png index 683c8e199..655ed08f9 100644 Binary files a/tests/testCases/operators/field/colorRampField_test.png and b/tests/testCases/operators/field/colorRampField_test.png differ diff --git a/tests/testCases/operators/field/colorSwitchField_test.png b/tests/testCases/operators/field/colorSwitchField_test.png index e7b221762..abb5d4039 100644 Binary files a/tests/testCases/operators/field/colorSwitchField_test.png and b/tests/testCases/operators/field/colorSwitchField_test.png differ diff --git a/tests/testCases/operators/field/iterationField_test.png b/tests/testCases/operators/field/iterationField_test.png index b4042470f..e19b0f916 100644 Binary files a/tests/testCases/operators/field/iterationField_test.png and b/tests/testCases/operators/field/iterationField_test.png differ diff --git a/tests/testCases/operators/field/metaballField_test.png b/tests/testCases/operators/field/metaballField_test.png index b37b83c0b..ef69376c7 100644 Binary files a/tests/testCases/operators/field/metaballField_test.png and b/tests/testCases/operators/field/metaballField_test.png differ diff --git a/tests/testCases/operators/field/polarVectorField_test.png b/tests/testCases/operators/field/polarVectorField_test.png index 9ed3cc912..930b18238 100644 Binary files a/tests/testCases/operators/field/polarVectorField_test.png and b/tests/testCases/operators/field/polarVectorField_test.png differ diff --git a/tests/testCases/operators/field/sdfNormalField_test.png b/tests/testCases/operators/field/sdfNormalField_test.png index 53f523d89..e2be488cf 100644 Binary files a/tests/testCases/operators/field/sdfNormalField_test.png and b/tests/testCases/operators/field/sdfNormalField_test.png differ diff --git a/tests/testCases/operators/field/stepField_test.png b/tests/testCases/operators/field/stepField_test.png index 9a65110be..1a0e2317b 100644 Binary files a/tests/testCases/operators/field/stepField_test.png and b/tests/testCases/operators/field/stepField_test.png differ diff --git a/tests/testCases/operators/field/texture1dField_test.png b/tests/testCases/operators/field/texture1dField_test.png new file mode 100644 index 000000000..2802a3eca Binary files /dev/null and b/tests/testCases/operators/field/texture1dField_test.png differ diff --git a/tests/testCases/operators/field/texture1dField_test.tox b/tests/testCases/operators/field/texture1dField_test.tox new file mode 100644 index 000000000..2c535d3fd Binary files /dev/null and b/tests/testCases/operators/field/texture1dField_test.tox differ diff --git a/tests/testCases/operators/field/textureField_test.png b/tests/testCases/operators/field/textureField_test.png index fadc2af02..1087abe3b 100644 Binary files a/tests/testCases/operators/field/textureField_test.png and b/tests/testCases/operators/field/textureField_test.png differ diff --git a/tests/testCases/operators/field/triPlanarTextureField_blend_test.png b/tests/testCases/operators/field/triPlanarTextureField_blend_test.png index 7c822fcdb..3ecd9aac5 100644 Binary files a/tests/testCases/operators/field/triPlanarTextureField_blend_test.png and b/tests/testCases/operators/field/triPlanarTextureField_blend_test.png differ diff --git a/tests/testCases/operators/field/triPlanarTextureField_test.png b/tests/testCases/operators/field/triPlanarTextureField_test.png index 245f6291a..c0378b0e9 100644 Binary files a/tests/testCases/operators/field/triPlanarTextureField_test.png and b/tests/testCases/operators/field/triPlanarTextureField_test.png differ diff --git a/tests/testCases/operators/field/uvField_test.png b/tests/testCases/operators/field/uvField_test.png index d4b858125..c9e33a4fe 100644 Binary files a/tests/testCases/operators/field/uvField_test.png and b/tests/testCases/operators/field/uvField_test.png differ diff --git a/tests/testCases/operators/filter/assignAttribute_test.png b/tests/testCases/operators/filter/assignAttribute_test.png new file mode 100644 index 000000000..a1ba2b473 Binary files /dev/null and b/tests/testCases/operators/filter/assignAttribute_test.png differ diff --git a/tests/testCases/operators/filter/assignAttribute_test.tox b/tests/testCases/operators/filter/assignAttribute_test.tox new file mode 100644 index 000000000..fcc694265 Binary files /dev/null and b/tests/testCases/operators/filter/assignAttribute_test.tox differ diff --git a/tests/testCases/operators/filter/extend_test.png b/tests/testCases/operators/filter/extend_test.png index 11d35c2b3..0e10bdfcf 100644 Binary files a/tests/testCases/operators/filter/extend_test.png and b/tests/testCases/operators/filter/extend_test.png differ diff --git a/tests/testCases/operators/filter/flip_test.png b/tests/testCases/operators/filter/flip_test.png index 4ea2c8b18..4d3d456f2 100644 Binary files a/tests/testCases/operators/filter/flip_test.png and b/tests/testCases/operators/filter/flip_test.png differ diff --git a/tests/testCases/operators/filter/gridClone_test.png b/tests/testCases/operators/filter/gridClone_test.png index 76a6f5ec2..3f12cc390 100644 Binary files a/tests/testCases/operators/filter/gridClone_test.png and b/tests/testCases/operators/filter/gridClone_test.png differ diff --git a/tests/testCases/operators/filter/gridClone_test.tox b/tests/testCases/operators/filter/gridClone_test.tox index 048c10651..992a3f4e3 100644 Binary files a/tests/testCases/operators/filter/gridClone_test.tox and b/tests/testCases/operators/filter/gridClone_test.tox differ diff --git a/tests/testCases/operators/filter/instance_test.png b/tests/testCases/operators/filter/instance_test.png index 73fde81aa..ad192c925 100644 Binary files a/tests/testCases/operators/filter/instance_test.png and b/tests/testCases/operators/filter/instance_test.png differ diff --git a/tests/testCases/operators/filter/iteratedTransform_test.png b/tests/testCases/operators/filter/iteratedTransform_test.png index 17297285b..dd9d783c4 100644 Binary files a/tests/testCases/operators/filter/iteratedTransform_test.png and b/tests/testCases/operators/filter/iteratedTransform_test.png differ diff --git a/tests/testCases/operators/filter/knife_test.png b/tests/testCases/operators/filter/knife_test.png index 064b246be..5f809c11d 100644 Binary files a/tests/testCases/operators/filter/knife_test.png and b/tests/testCases/operators/filter/knife_test.png differ diff --git a/tests/testCases/operators/filter/knife_test.tox b/tests/testCases/operators/filter/knife_test.tox index 648e24ed5..93517847a 100644 Binary files a/tests/testCases/operators/filter/knife_test.tox and b/tests/testCases/operators/filter/knife_test.tox differ diff --git a/tests/testCases/operators/filter/limitField_test.png b/tests/testCases/operators/filter/limitField_test.png index 985dc0ac4..b0a16fa0d 100644 Binary files a/tests/testCases/operators/filter/limitField_test.png and b/tests/testCases/operators/filter/limitField_test.png differ diff --git a/tests/testCases/operators/filter/limitField_test.tox b/tests/testCases/operators/filter/limitField_test.tox index 006f64208..e9aa9d52d 100644 Binary files a/tests/testCases/operators/filter/limitField_test.tox and b/tests/testCases/operators/filter/limitField_test.tox differ diff --git a/tests/testCases/operators/filter/linearClone_test.png b/tests/testCases/operators/filter/linearClone_test.png index 7e121d2fa..e87237fe8 100644 Binary files a/tests/testCases/operators/filter/linearClone_test.png and b/tests/testCases/operators/filter/linearClone_test.png differ diff --git a/tests/testCases/operators/filter/linearClone_test.tox b/tests/testCases/operators/filter/linearClone_test.tox index 551ead0ee..6dfdad57e 100644 Binary files a/tests/testCases/operators/filter/linearClone_test.tox and b/tests/testCases/operators/filter/linearClone_test.tox differ diff --git a/tests/testCases/operators/filter/magnet_test.png b/tests/testCases/operators/filter/magnet_test.png index 9c0063642..d5d3250c2 100644 Binary files a/tests/testCases/operators/filter/magnet_test.png and b/tests/testCases/operators/filter/magnet_test.png differ diff --git a/tests/testCases/operators/filter/modifyNormals_test.png b/tests/testCases/operators/filter/modifyNormals_test.png index 2b60673c0..a2ace6ec4 100644 Binary files a/tests/testCases/operators/filter/modifyNormals_test.png and b/tests/testCases/operators/filter/modifyNormals_test.png differ diff --git a/tests/testCases/operators/filter/modulo1D_test.png b/tests/testCases/operators/filter/modulo1D_test.png index 89398d7d7..cbf2e9980 100644 Binary files a/tests/testCases/operators/filter/modulo1D_test.png and b/tests/testCases/operators/filter/modulo1D_test.png differ diff --git a/tests/testCases/operators/filter/modulo1D_test.tox b/tests/testCases/operators/filter/modulo1D_test.tox index 6fb2358cd..872150638 100644 Binary files a/tests/testCases/operators/filter/modulo1D_test.tox and b/tests/testCases/operators/filter/modulo1D_test.tox differ diff --git a/tests/testCases/operators/filter/modulo2D_test.png b/tests/testCases/operators/filter/modulo2D_test.png index eb953f47a..1a9454d20 100644 Binary files a/tests/testCases/operators/filter/modulo2D_test.png and b/tests/testCases/operators/filter/modulo2D_test.png differ diff --git a/tests/testCases/operators/filter/modulo2D_test.tox b/tests/testCases/operators/filter/modulo2D_test.tox index 4d7c89f3c..24d8922a9 100644 Binary files a/tests/testCases/operators/filter/modulo2D_test.tox and b/tests/testCases/operators/filter/modulo2D_test.tox differ diff --git a/tests/testCases/operators/filter/moduloDistance_test.png b/tests/testCases/operators/filter/moduloDistance_test.png index 2ecf6bde6..0de2f9f76 100644 Binary files a/tests/testCases/operators/filter/moduloDistance_test.png and b/tests/testCases/operators/filter/moduloDistance_test.png differ diff --git a/tests/testCases/operators/filter/moduloPolar_test.png b/tests/testCases/operators/filter/moduloPolar_test.png index 4cc83e908..a4e7d2cb1 100644 Binary files a/tests/testCases/operators/filter/moduloPolar_test.png and b/tests/testCases/operators/filter/moduloPolar_test.png differ diff --git a/tests/testCases/operators/filter/moduloPolar_test.tox b/tests/testCases/operators/filter/moduloPolar_test.tox index 793b5c45e..2ab816368 100644 Binary files a/tests/testCases/operators/filter/moduloPolar_test.tox and b/tests/testCases/operators/filter/moduloPolar_test.tox differ diff --git a/tests/testCases/operators/filter/onion_test.png b/tests/testCases/operators/filter/onion_test.png index 483f8ff69..b70640ba0 100644 Binary files a/tests/testCases/operators/filter/onion_test.png and b/tests/testCases/operators/filter/onion_test.png differ diff --git a/tests/testCases/operators/filter/radialClone_test.png b/tests/testCases/operators/filter/radialClone_test.png index 68595eada..ee24acfcd 100644 Binary files a/tests/testCases/operators/filter/radialClone_test.png and b/tests/testCases/operators/filter/radialClone_test.png differ diff --git a/tests/testCases/operators/filter/radialClone_test.tox b/tests/testCases/operators/filter/radialClone_test.tox index 475c988e6..fad561a35 100644 Binary files a/tests/testCases/operators/filter/radialClone_test.tox and b/tests/testCases/operators/filter/radialClone_test.tox differ diff --git a/tests/testCases/operators/filter/rangeTransform_test.png b/tests/testCases/operators/filter/rangeTransform_test.png index 42f7a4cb2..65eab2dab 100644 Binary files a/tests/testCases/operators/filter/rangeTransform_test.png and b/tests/testCases/operators/filter/rangeTransform_test.png differ diff --git a/tests/testCases/operators/filter/reflect_iteration_test.png b/tests/testCases/operators/filter/reflect_iteration_test.png index 29b711b0c..42f4fb27b 100644 Binary files a/tests/testCases/operators/filter/reflect_iteration_test.png and b/tests/testCases/operators/filter/reflect_iteration_test.png differ diff --git a/tests/testCases/operators/filter/remapCoords_3d_test.png b/tests/testCases/operators/filter/remapCoords_3d_test.png index 7753dd766..61ba32b1b 100644 Binary files a/tests/testCases/operators/filter/remapCoords_3d_test.png and b/tests/testCases/operators/filter/remapCoords_3d_test.png differ diff --git a/tests/testCases/operators/filter/rotate4D_test.png b/tests/testCases/operators/filter/rotate4D_test.png index c7b47a0eb..9b4d532c6 100644 Binary files a/tests/testCases/operators/filter/rotate4D_test.png and b/tests/testCases/operators/filter/rotate4D_test.png differ diff --git a/tests/testCases/operators/filter/rotate_pivot_test.png b/tests/testCases/operators/filter/rotate_pivot_test.png index cefcbb90e..b53997f43 100644 Binary files a/tests/testCases/operators/filter/rotate_pivot_test.png and b/tests/testCases/operators/filter/rotate_pivot_test.png differ diff --git a/tests/testCases/operators/filter/rotate_test.png b/tests/testCases/operators/filter/rotate_test.png index 56ebcd6de..92693319d 100644 Binary files a/tests/testCases/operators/filter/rotate_test.png and b/tests/testCases/operators/filter/rotate_test.png differ diff --git a/tests/testCases/operators/filter/sphericalMobiusTransform_test.png b/tests/testCases/operators/filter/sphericalMobiusTransform_test.png index 54bd43cbc..26fb72cd6 100644 Binary files a/tests/testCases/operators/filter/sphericalMobiusTransform_test.png and b/tests/testCases/operators/filter/sphericalMobiusTransform_test.png differ diff --git a/tests/testCases/operators/filter/uvTransform_test.png b/tests/testCases/operators/filter/uvTransform_test.png index b3c354bf2..804de6af8 100644 Binary files a/tests/testCases/operators/filter/uvTransform_test.png and b/tests/testCases/operators/filter/uvTransform_test.png differ diff --git a/tests/testCases/operators/function/pausingWaveFn_test.png b/tests/testCases/operators/function/pausingWaveFn_test.png index 4b90e4f8e..f4d0394ee 100644 Binary files a/tests/testCases/operators/function/pausingWaveFn_test.png and b/tests/testCases/operators/function/pausingWaveFn_test.png differ diff --git a/tests/testCases/operators/function/pausingWaveFn_test.tox b/tests/testCases/operators/function/pausingWaveFn_test.tox index cba113b87..f155b8c98 100644 Binary files a/tests/testCases/operators/function/pausingWaveFn_test.tox and b/tests/testCases/operators/function/pausingWaveFn_test.tox differ diff --git a/tests/testCases/operators/light/ambientLight_test.png b/tests/testCases/operators/light/ambientLight_test.png index f794cd53a..ab7c0aab5 100644 Binary files a/tests/testCases/operators/light/ambientLight_test.png and b/tests/testCases/operators/light/ambientLight_test.png differ diff --git a/tests/testCases/operators/light/axisLight_test.png b/tests/testCases/operators/light/axisLight_test.png index 4102ba06b..52583973c 100644 Binary files a/tests/testCases/operators/light/axisLight_test.png and b/tests/testCases/operators/light/axisLight_test.png differ diff --git a/tests/testCases/operators/light/lightVolume_test.png b/tests/testCases/operators/light/lightVolume_test.png index efca3e440..3ec9f2cdd 100644 Binary files a/tests/testCases/operators/light/lightVolume_test.png and b/tests/testCases/operators/light/lightVolume_test.png differ diff --git a/tests/testCases/operators/light/pointLight_test.png b/tests/testCases/operators/light/pointLight_test.png index c02211d5d..166963d53 100644 Binary files a/tests/testCases/operators/light/pointLight_test.png and b/tests/testCases/operators/light/pointLight_test.png differ diff --git a/tests/testCases/operators/light/spotLight_test.png b/tests/testCases/operators/light/spotLight_test.png index 21e73bd29..7b12fda07 100644 Binary files a/tests/testCases/operators/light/spotLight_test.png and b/tests/testCases/operators/light/spotLight_test.png differ diff --git a/tests/testCases/operators/light/volumetricRayCast_test.png b/tests/testCases/operators/light/volumetricRayCast_test.png index cb4853d4b..75299096c 100644 Binary files a/tests/testCases/operators/light/volumetricRayCast_test.png and b/tests/testCases/operators/light/volumetricRayCast_test.png differ diff --git a/tests/testCases/operators/material/basicMat_iteration_test.png b/tests/testCases/operators/material/basicMat_iteration_test.png index 6af3bc2b9..b4e953648 100644 Binary files a/tests/testCases/operators/material/basicMat_iteration_test.png and b/tests/testCases/operators/material/basicMat_iteration_test.png differ diff --git a/tests/testCases/operators/material/basicMat_position_test.png b/tests/testCases/operators/material/basicMat_position_test.png index 1b42882ee..846370fc2 100644 Binary files a/tests/testCases/operators/material/basicMat_position_test.png and b/tests/testCases/operators/material/basicMat_position_test.png differ diff --git a/tests/testCases/operators/material/goochShadingContrib_test.tox b/tests/testCases/operators/material/goochShadingContrib_test.tox index 6394cd925..8f2f7dae0 100644 Binary files a/tests/testCases/operators/material/goochShadingContrib_test.tox and b/tests/testCases/operators/material/goochShadingContrib_test.tox differ diff --git a/tests/testCases/operators/material/pbrMat_fields_test.png b/tests/testCases/operators/material/pbrMat_fields_test.png index 099c360ae..b2c73cccc 100644 Binary files a/tests/testCases/operators/material/pbrMat_fields_test.png and b/tests/testCases/operators/material/pbrMat_fields_test.png differ diff --git a/tests/testCases/operators/material/pbrMat_test.png b/tests/testCases/operators/material/pbrMat_test.png index 9d109329d..6445a775e 100644 Binary files a/tests/testCases/operators/material/pbrMat_test.png and b/tests/testCases/operators/material/pbrMat_test.png differ diff --git a/tests/testCases/operators/material/reflectContrib_test.png b/tests/testCases/operators/material/reflectContrib_test.png index e53336395..7be832c95 100644 Binary files a/tests/testCases/operators/material/reflectContrib_test.png and b/tests/testCases/operators/material/reflectContrib_test.png differ diff --git a/tests/testCases/operators/material/reflectMat_2_test.png b/tests/testCases/operators/material/reflectMat_2_test.png index 256f67719..9328f59eb 100644 Binary files a/tests/testCases/operators/material/reflectMat_2_test.png and b/tests/testCases/operators/material/reflectMat_2_test.png differ diff --git a/tests/testCases/operators/material/reflectMat_test.png b/tests/testCases/operators/material/reflectMat_test.png index f6f458d21..ea78a40ab 100644 Binary files a/tests/testCases/operators/material/reflectMat_test.png and b/tests/testCases/operators/material/reflectMat_test.png differ diff --git a/tests/testCases/operators/material/sampledPointMat_test.png b/tests/testCases/operators/material/sampledPointMat_test.png index 82996faf0..20c5b4ce6 100644 Binary files a/tests/testCases/operators/material/sampledPointMat_test.png and b/tests/testCases/operators/material/sampledPointMat_test.png differ diff --git a/tests/testCases/operators/output/experimentalRaymarchRender3D_test.tox b/tests/testCases/operators/output/experimentalRaymarchRender3D_test.tox index 9852030b6..c15476d41 100644 Binary files a/tests/testCases/operators/output/experimentalRaymarchRender3D_test.tox and b/tests/testCases/operators/output/experimentalRaymarchRender3D_test.tox differ diff --git a/tests/testCases/operators/output/fieldRender_test.png b/tests/testCases/operators/output/fieldRender_test.png index 983f77b70..e9d269038 100644 Binary files a/tests/testCases/operators/output/fieldRender_test.png and b/tests/testCases/operators/output/fieldRender_test.png differ diff --git a/tests/testCases/operators/output/pointMapRender_2d_test.png b/tests/testCases/operators/output/pointMapRender_2d_test.png index 1c9484e5b..764e80472 100644 Binary files a/tests/testCases/operators/output/pointMapRender_2d_test.png and b/tests/testCases/operators/output/pointMapRender_2d_test.png differ diff --git a/tests/testCases/operators/output/pointMapRender_3d_texture_test.png b/tests/testCases/operators/output/pointMapRender_3d_texture_test.png index 04c916bce..8a65e9d77 100644 Binary files a/tests/testCases/operators/output/pointMapRender_3d_texture_test.png and b/tests/testCases/operators/output/pointMapRender_3d_texture_test.png differ diff --git a/tests/testCases/operators/output/pointMapRender_field_test.png b/tests/testCases/operators/output/pointMapRender_field_test.png index bcc3d958e..a202343f1 100644 Binary files a/tests/testCases/operators/output/pointMapRender_field_test.png and b/tests/testCases/operators/output/pointMapRender_field_test.png differ diff --git a/tests/testCases/operators/output/pointMapRender_objectId_test.png b/tests/testCases/operators/output/pointMapRender_objectId_test.png index a0e5f1dfe..36ad97eb1 100644 Binary files a/tests/testCases/operators/output/pointMapRender_objectId_test.png and b/tests/testCases/operators/output/pointMapRender_objectId_test.png differ diff --git a/tests/testCases/operators/output/pointMapRender_test.png b/tests/testCases/operators/output/pointMapRender_test.png index c05b0b884..d1627969e 100644 Binary files a/tests/testCases/operators/output/pointMapRender_test.png and b/tests/testCases/operators/output/pointMapRender_test.png differ diff --git a/tests/testCases/operators/output/raymarchRender3D_nearHit_test.png b/tests/testCases/operators/output/raymarchRender3D_nearHit_test.png index d42c9ff04..d2a25fd39 100644 Binary files a/tests/testCases/operators/output/raymarchRender3D_nearHit_test.png and b/tests/testCases/operators/output/raymarchRender3D_nearHit_test.png differ diff --git a/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.png b/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.png index 26de2b0c3..38296ff6d 100644 Binary files a/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.png and b/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.png differ diff --git a/tests/testCases/operators/pattern/tilingPattern_test.png b/tests/testCases/operators/pattern/tilingPattern_test.png index c8f5a407a..ae4d2067e 100644 Binary files a/tests/testCases/operators/pattern/tilingPattern_test.png and b/tests/testCases/operators/pattern/tilingPattern_test.png differ diff --git a/tests/testCases/operators/sdf/boxSdf_attrs_test.png b/tests/testCases/operators/sdf/boxSdf_attrs_test.png new file mode 100644 index 000000000..6b8fcfc7b Binary files /dev/null and b/tests/testCases/operators/sdf/boxSdf_attrs_test.png differ diff --git a/tests/testCases/operators/sdf/boxSdf_attrs_test.tox b/tests/testCases/operators/sdf/boxSdf_attrs_test.tox new file mode 100644 index 000000000..d2137d1be Binary files /dev/null and b/tests/testCases/operators/sdf/boxSdf_attrs_test.tox differ diff --git a/tests/testCases/operators/sdf/boxSdf_test.png b/tests/testCases/operators/sdf/boxSdf_test.png index 489424a50..b14d27832 100644 Binary files a/tests/testCases/operators/sdf/boxSdf_test.png and b/tests/testCases/operators/sdf/boxSdf_test.png differ diff --git a/tests/testCases/operators/sdf/boxSdf_test.tox b/tests/testCases/operators/sdf/boxSdf_test.tox index 07e2cf565..ecc8ef477 100644 Binary files a/tests/testCases/operators/sdf/boxSdf_test.tox and b/tests/testCases/operators/sdf/boxSdf_test.tox differ diff --git a/tests/testCases/operators/sdf/boxSdf_uv_test.png b/tests/testCases/operators/sdf/boxSdf_uv_test.png index 898d06ebb..b80161ff7 100644 Binary files a/tests/testCases/operators/sdf/boxSdf_uv_test.png and b/tests/testCases/operators/sdf/boxSdf_uv_test.png differ diff --git a/tests/testCases/operators/sdf/capsuleSdf_test.tox b/tests/testCases/operators/sdf/capsuleSdf_test.tox index 719a35a46..99d59b4b2 100644 Binary files a/tests/testCases/operators/sdf/capsuleSdf_test.tox and b/tests/testCases/operators/sdf/capsuleSdf_test.tox differ diff --git a/tests/testCases/operators/sdf/petalSdf_test.png b/tests/testCases/operators/sdf/petalSdf_test.png index cd0328bb6..455c460a3 100644 Binary files a/tests/testCases/operators/sdf/petalSdf_test.png and b/tests/testCases/operators/sdf/petalSdf_test.png differ diff --git a/tests/testCases/operators/sdf/petalSdf_test.tox b/tests/testCases/operators/sdf/petalSdf_test.tox index a4ba61ffb..e23e42e80 100644 Binary files a/tests/testCases/operators/sdf/petalSdf_test.tox and b/tests/testCases/operators/sdf/petalSdf_test.tox differ diff --git a/tests/testCases/operators/sdf/polyhedronSdf_test.png b/tests/testCases/operators/sdf/polyhedronSdf_test.png index 8575cd104..46127eb6c 100644 Binary files a/tests/testCases/operators/sdf/polyhedronSdf_test.png and b/tests/testCases/operators/sdf/polyhedronSdf_test.png differ diff --git a/tests/testCases/operators/sdf/sphereFbmSdf_test.png b/tests/testCases/operators/sdf/sphereFbmSdf_test.png index d9f09b7c1..b67cab7ab 100644 Binary files a/tests/testCases/operators/sdf/sphereFbmSdf_test.png and b/tests/testCases/operators/sdf/sphereFbmSdf_test.png differ diff --git a/tests/testCases/operators/sdf/vesicaSegmentSdf_test.png b/tests/testCases/operators/sdf/vesicaSegmentSdf_test.png new file mode 100644 index 000000000..e356d436e Binary files /dev/null and b/tests/testCases/operators/sdf/vesicaSegmentSdf_test.png differ diff --git a/tests/testCases/operators/sdf/vesicaSegmentSdf_test.tox b/tests/testCases/operators/sdf/vesicaSegmentSdf_test.tox new file mode 100644 index 000000000..cb362e5d0 Binary files /dev/null and b/tests/testCases/operators/sdf/vesicaSegmentSdf_test.tox differ diff --git a/tests/testCases/operators/sdf2d/coolSSdf2d_test.png b/tests/testCases/operators/sdf2d/coolSSdf2d_test.png index dd03c0169..7ea0e330f 100644 Binary files a/tests/testCases/operators/sdf2d/coolSSdf2d_test.png and b/tests/testCases/operators/sdf2d/coolSSdf2d_test.png differ diff --git a/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.png b/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.png new file mode 100644 index 000000000..580a6f0c7 Binary files /dev/null and b/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.png differ diff --git a/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.tox b/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.tox new file mode 100644 index 000000000..a9ca49c0c Binary files /dev/null and b/tests/testCases/operators/sdf2d/isoscelesTriangleSdf2d_test.tox differ diff --git a/tests/testCases/operators/sdf2d/lineSegmentSdf2d_test.tox b/tests/testCases/operators/sdf2d/lineSegmentSdf2d_test.tox index 1d9ad43d6..ab12444e1 100644 Binary files a/tests/testCases/operators/sdf2d/lineSegmentSdf2d_test.tox and b/tests/testCases/operators/sdf2d/lineSegmentSdf2d_test.tox differ diff --git a/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.png b/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.png index 919e242ca..7f5a22292 100644 Binary files a/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.png and b/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.png differ diff --git a/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.tox b/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.tox index 0ebdc2988..106a3d1d4 100644 Binary files a/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.tox and b/tests/testCases/operators/sdf2d/roundedRectangleSdf2d_test.tox differ diff --git a/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.png b/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.png new file mode 100644 index 000000000..a1589cfaf Binary files /dev/null and b/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.png differ diff --git a/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.tox b/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.tox new file mode 100644 index 000000000..230037a94 Binary files /dev/null and b/tests/testCases/operators/sdf2d/vesicaSegmentSdf2d_test.tox differ diff --git a/tests/testCases/operators/utility/getAttribute_test.tox b/tests/testCases/operators/utility/getAttribute_test.tox index 2a3449192..a5b12adc1 100644 Binary files a/tests/testCases/operators/utility/getAttribute_test.tox and b/tests/testCases/operators/utility/getAttribute_test.tox differ diff --git a/tests/testCases/operators/utility/variableList_test.tox b/tests/testCases/operators/utility/variableList_test.tox new file mode 100644 index 000000000..b431bb4b5 Binary files /dev/null and b/tests/testCases/operators/utility/variableList_test.tox differ diff --git a/version.txt b/version.txt index 2c5c318af..46b9ad419 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ -toolkitVersion 0.35 +toolkitVersion 0.36 touchDesignerVersion 099 -touchDesignerBuild 2022.32660 +touchDesignerBuild 2022.33910