[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 10:45:44 PDT 2025
================
@@ -214,6 +214,53 @@ const inline double4 dst(double4 Src0, double4 Src1) {
return __detail::dst_impl(Src0, Src1);
}
+//===----------------------------------------------------------------------===//
+// faceforward builtin
+//===----------------------------------------------------------------------===//
+
+/// \fn T faceforward(T N, T I, T Ng)
+/// \brief Flips the surface-normal (if needed) to face in a direction opposite
+/// to \a I. Returns the result in \a N.
----------------
inbelic wrote:
I assume this is copied from the docs, but "returns the result in N" is quite confusing to me. Maybe it was meant to be "Returns the result in terms of N" or the like?
https://github.com/llvm/llvm-project/pull/135878
More information about the llvm-commits
mailing list