smoothstep
이 페이지에서

smoothstep()

함수, 내장 함수 분류

smoothstep(e0, e1, x): Hermite interpolation from 0 at x = e0 to 1 at x = e1, component-wise.

import { smoothstep } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

function smoothstep<K extends `vec${number}<f32>`>(
e0: ReadonlyNode<K>,
e1: ReadonlyNode<K>,
x: ReadonlyNode<K>,
): Node<K>;
function smoothstep(
e0: ReadonlyNode<'f32'> | number,
e1: ReadonlyNode<'f32'> | number,
x: ReadonlyNode<'f32'> | number,
): Node<'f32'>;

매개변수

e0 ReadonlyNode<K>
e1 ReadonlyNode<K>
x ReadonlyNode<K>

반환값

Node<K>

설명

WGSL requires all three arguments to have the same type, scalar or vector. The vector overload keeps the key of x; the scalar overload takes f32 nodes or JS numbers.

대상별 지원

대상지원비고
WGSL (WebGPU) 지원

smoothstep(e0, e1, x).

GLSL ES 3.00 (WebGL2) 지원

smoothstep(e0, e1, x).

CPU 오라클 지원

Evaluated in f64 by the oracle.

관련 가이드

소스

src/core/ir/node.ts, 1759행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고