mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
50 lines
853 B
Plaintext
50 lines
853 B
Plaintext
// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
|
|
|
|
CCEffect %{
|
|
techniques:
|
|
- passes:
|
|
- vert: vs
|
|
frag: fs
|
|
pass: post-process
|
|
rasterizerState:
|
|
cullMode: none
|
|
depthStencilState:
|
|
depthTest: false
|
|
depthWrite: false
|
|
blendState:
|
|
targets:
|
|
- blend: true
|
|
blendSrc: one
|
|
blendDst: one_minus_src_alpha
|
|
blendSrcAlpha: one
|
|
blendDstAlpha: zero
|
|
}%
|
|
|
|
|
|
CCProgram vs %{
|
|
#include <./chunks/vs>
|
|
}%
|
|
|
|
|
|
CCProgram fs %{
|
|
precision highp float;
|
|
|
|
// #include <builtin/uniforms/cc-global>
|
|
|
|
in vec2 v_uv;
|
|
|
|
uniform UBO {
|
|
vec4 inputViewPort;
|
|
};
|
|
#pragma rate inputTexture pass
|
|
uniform sampler2D inputTexture;
|
|
|
|
layout(location = 0) out vec4 fragColor;
|
|
|
|
void main () {
|
|
fragColor = texture(inputTexture, v_uv);
|
|
}
|
|
|
|
}%
|
|
|