Discard
이 페이지에서

Discard()

함수, 작성 분류

Push a discard; onto the innermost scope.

import { Discard } from 'typeshade'

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

구문

const Discard: () => void

반환값

void

설명

Push a discard; onto the innermost scope. It ends the current fragment invocation with no color or depth write, the fragment-only terminator of both WGSL and GLSL. It is typically guarded by an If for a cull test: a backface, an alpha clip, an out-of-bounds sample.

예제

예제

If(cosC.lt(0), () => {
Discard()
})

관련 가이드

소스

src/core/ir/builder.ts, 1765행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고