Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Texture blit shaders
Texture blit shaders are used to define the behavior of blit calls on a DrawableTexture2D.
Texture blit shaders only have one processing function, the blit() function,
which runs for every pixel of the source texture inside the rect given to
blit_rect().
더 보기
See Using DrawableTextures for more information on how to use texture blit shaders as part of a DrawableTexture.
렌더러 모드
렌더링 모드 |
설명 |
|---|---|
blend_disabled |
Disable blending, values (including alpha) are written as-is. Default. |
블렌드_믹스 |
Mix blend mode (alpha is transparency). |
블렌드_추가 |
덧셈 블렌드 모드. |
blend_sub |
빼기 블렌드 모드. |
blend_mul |
곱셈 블렌드 모드. |
참고
There is no premultiplied alpha blend mode for Texture blit shaders.
Built-In(내장)
``in``로 표시된 값은 읽기 전용입니다. ``out``로 표시된 값은 선택적으로 쓸 수 있으며 반드시 합리적인 값을 포함하지는 않습니다. ``inout``로 표시된 값은 적절한 기본값을 제공하며 선택적으로 쓸 수 있습니다. 샘플러는 기록할 수 없으므로 표시되지 않습니다.
벡터 내장 타입
전역 내장 기능은 사용자 정의 기능을 포함하여 어디에서나 사용할 수 있습니다.
내장 |
설명 |
|---|---|
부동 소수점 TIME |
엔진이 시작된 이후의 전역 시간(초)입니다. |
부동 소수점 PI |
|
부동 TAU |
A |
부동 E |
An |
Blit built-ins
Source textures
Texture blit shaders have up to 4 source textures bound as inputs. These can be
accessed with a sampler2D using hint_blit_source0,
hint_blit_source1, hint_blit_source2, and hint_blit_source3.
내장 |
설명 |
|---|---|
vec4에서 FRAGCOORD |
Coordinate of pixel center. In screen space. |
vec2 UV에서 |
UV from the |
in vec4 MODULATE |
|
out vec4 COLOR0 |
Output color to blended with the DrawableTexture target.
Initialized to |
out vec4 COLOR1 |
Output color to blended with an extra DrawableTexture target.
Initialized to |
out vec4 COLOR2 |
Output color to blended with an extra DrawableTexture target.
Initialized to |
out vec4 COLOR3 |
Output color to blended with an extra DrawableTexture target.
Initialized to |