Given (), Orthonormalize
(), yielding ()...
Where the matrix may be helpful:
It’s assumed that 1 output-point is to
result, from 4 input-heights.
If (Pmax) is the maximum pixel-value,
(Hmax) is the maximum height or depth
in 3D, and (Dtex) is the distance between
Texels in 3D, Then:
(Dtex) could also be the known distance
between undisplaced input-points. And,
since only (c-squared) will ever be used,
the squares of (Dtex) and (Hmax) may also
be used, if (Pmax) is to be squared by itself,
and then the resulting (c) not squared again,
since their computation may be cheaper on
the GPU, than the actual computation of (Dtex),
which would require that another square root
be computed.
After all, the programming of certain shaders
may make it more difficult, to displace the
texel-sampling-point by (1 texel), than it is
just to sample the texture according to (more
than 1 input-point texture-coordinate-set),
within one shader invocation. This can be
due to mip-mapping.
BTW: I have not yet shown, how to compute
the deltas in texture-coordinates, to arrive
at (h1, h2, h3, h4) above:
However, if input-point-distances are to be
used, then the tangent-mapping would also
need to be modified, so that the tangent-vector
will become one of the tessellation axes,
derived from one of the sides of the input
geometry. The bitangent-vector could then
either be computed from re-crossing (with the
derived normal-vector of the output-
geometry), or from an arbitrary other side of
the input geometry, subject to Gram-Schmidt
orthonormalization. In either case, care
should be taken also to make sure, that the sign
of the bitangent-vector, corresponds to the
secondary direction, in which tessellation did
in fact take place.
OTOH, the coder could find that he’s been given
an input to the GS, which is already tessellated -
but as (1 triangle), in case DirectX11- or OpenGL4-
methods were being used. In that case, sub-
optimal equations may result, much like so:
The wide hat means ’normalize’, and I think
that only 1 Micropolygon-point could result, per
GS input-triangle.