From 4e897189e301e44cba71906e6c5e561b7cd07a62 Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Mon, 24 Feb 2025 12:56:43 -0500 Subject: 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 --- source/slang/hlsl.meta.slang | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'source') diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 78eb48a33..a2b685b69 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -11676,25 +11676,6 @@ vector nextafter(vector x, vector y) } } -/// Generate a random number (unsupported). -/// @param x The seed value. -/// @remarks This function is not supported in that it always returns 0. -/// @deprecated -/// @category math -[__readNone] -[deprecated("Always returns 0")] -float noise(float x) -{ - return 0; -} - -[__readNone] -[deprecated("Always returns 0")] -__generic float noise(vector x) -{ - return 0; -} - /// Indicate that an index may be non-uniform at execution time. /// /// Shader Model 5.1 and 6.x introduce support for dynamic indexing -- cgit v1.2.3