[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 14 12:43:52 PDT 2025
================
@@ -71,6 +71,27 @@ constexpr vector<T, L> reflect_vec_impl(vector<T, L> I, vector<T, L> N) {
#endif
}
+template <typename T> constexpr T refract_impl(T I, T N, T eta) {
+ T k = 1 - eta * eta * (1 - (N * I * N *I));
+ if(k < 0)
----------------
raoanag wrote:
the latest commit uses select, but the hlsl tests have not been updated, will decide next steps based on offline discuss
https://github.com/llvm/llvm-project/pull/136026
More information about the cfe-commits
mailing list