mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-09 00:58:50 +08:00
* Rearrange IA input variables and functions for surface shader Fix default_skybox.meta missing * Update compiled shaders * Fix code style
51 lines
954 B
Plaintext
51 lines
954 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 <cc-global>
|
|
#include <decode-base>
|
|
#include <cc-local-batch>
|
|
#include <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 <output>
|
|
|
|
in vec2 bary;
|
|
|
|
in vec4 lineCol;
|
|
vec4 frag () {
|
|
return CCFragOutput(lineCol);
|
|
}
|
|
}%
|