@interpolate
이 페이지에서

@interpolate

어트리뷰트

How a @location varying is interpolated: @interpolate("flat"), or a type and a sampling as in @interpolate("linear", "centroid").

이름마다 붙은 시그니처와 설명은 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

declare function interpolate(type: string, sampling?: string): (target: unknown, context?: unknown) => void

매개변수

  • type string
  • sampling 선택 사항 string

선언에는 TypeScript 데코레이터 런타임이 넘겨주는 target과 context도 적혀 있습니다. 호출에서는 둘 다 쓰지 않습니다.

설명

An integer varying takes flat automatically. GLSL ES 3.00 has smooth, flat and centroid only, so "linear" and the "sample" position fail the module closed on that target.

예제

함께 보기

이 페이지 편집 문제 보고