I was experimenting with making a Bezier patch using Blender Geometry nodes, planning to maybe port the solution to Unity later. I started with a quad patch made of 4 curves:

I dont understand the math involved much. The best I could do is to construct 2 “sweep surfaces” in U and V direction, using data from a node that samples a curve position a a given length. Algorithm was something like

SurfacePosition = lerp ( SampleCurve(CurveU1,IndexU), SampleCurve(CurveU2,IndexU) , IndexV)

where U1 and U2 are curves forming opposite sides of the patch

But I cant combine this data into final surface. Linear interpolation at 50% looks nowhere accurate. I remember Bezier patches from when I worked with 3ds Max, and they always matched the base curves 100%, no “deflation” occured. Blender forums offered no help so far

Vector Math - Maximum node produces accurate result, but clips the negative coordinate values. And I cant reproduce its effect on my own

Any hints? Perhaps examples of scripts that generate Bezier surface in Unity code?