================ @@ -101,6 +101,16 @@ constexpr vector<T, N> smoothstep_vec_impl(vector<T, N> Min, vector<T, N> Max, #endif } +template <typename T> constexpr vector<T, 4> lit_impl(T NDotL, T NDotH, T M) { + bool DiffuseCond = NDotL < 0; + T Diffuse = select<T>(DiffuseCond, 0, NDotL); + vector<T, 4> Result = {1, Diffuse, 0, 1}; + bool SpecularCond = or (DiffuseCond, (NDotH < 0)); ---------------- kmpeng wrote:
Code updated https://github.com/llvm/llvm-project/pull/134171 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits