This is a refined version of my earlier question Convex extensibility of combination of two linesConvex extensibility of combination of two lines.
Is there a smooth function $f:[0,1]\times [0,1]\rightarrow\mathbb R$ such that for all $x\in [0,1]$, $$ f(x,1)=x,\qquad f(x,0)=0, $$ and $f$ is convex or concave?
If yes, is there a "nice" example?