Files
cocos4/editor/assets/effects/internal/builtin-wireframe.effect
T
jk20012001 86b86ca873 rearrange effects folder (#14202)
* rearrange effects folder

* fix
2023-02-14 10:10:17 +08:00

51 lines
996 B
Plaintext

// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
CCEffect %{
techniques:
- name: opaque
passes:
- vert: wireframe-vs:vert
frag: wireframe-fs:frag
properties:
lineColor: { value: [1, 1, 1, 1] }
}%
CCProgram wireframe-vs %{
precision mediump float;
#include <builtin/uniforms/cc-global>
#include <legacy/decode-base>
#include <legacy/local-batch>
#include <legacy/input>
uniform TexCoords {
vec4 lineColor;
};
out vec2 bary;
out vec4 lineCol;
vec4 vert () {
vec4 position;
CCVertInput(position);
mat4 matWorld;
CCGetWorldMatrix(matWorld);
bary = a_texCoord;
lineCol = lineColor;
return cc_matProj * (cc_matView * matWorld) * position;;
}
}%
CCProgram wireframe-fs %{
precision mediump float;
#include <legacy/output>
in vec2 bary;
in vec4 lineCol;
vec4 frag () {
return CCFragOutput(lineCol);
}
}%