Skip to content

Commit 4e89718

Browse files
authored
Remove noise() from core library (#6421)
noise() is currently marked "unsupported" in Slang documentation, and has also been unsupported in HLSL since SM 2.0 Until now, noise() was present only to prevent compilation errors, but not for any actual use since it returns 0.0 always. Closes #5775
1 parent 5bf0c95 commit 4e89718

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

source/slang/hlsl.meta.slang

-19
Original file line numberDiff line numberDiff line change
@@ -11676,25 +11676,6 @@ vector<T,N> nextafter(vector<T,N> x, vector<T,N> y)
1167611676
}
1167711677
}
1167811678

11679-
/// Generate a random number (unsupported).
11680-
/// @param x The seed value.
11681-
/// @remarks This function is not supported in that it always returns 0.
11682-
/// @deprecated
11683-
/// @category math
11684-
[__readNone]
11685-
[deprecated("Always returns 0")]
11686-
float noise(float x)
11687-
{
11688-
return 0;
11689-
}
11690-
11691-
[__readNone]
11692-
[deprecated("Always returns 0")]
11693-
__generic<let N : int> float noise(vector<float, N> x)
11694-
{
11695-
return 0;
11696-
}
11697-
1169811679
/// Indicate that an index may be non-uniform at execution time.
1169911680
///
1170011681
/// Shader Model 5.1 and 6.x introduce support for dynamic indexing

0 commit comments

Comments
 (0)