Files
cocos4/editor/assets/chunks/decode-base.chunk
T
troublemaker52025 e723e5aa3a Add renderMesh bias for v3.5.0 (#10102)
* Add renderMesh bias for v3.5.0

* fix ci error

* change function name

* fix merge error

* update

* update 2

* update

* update

* update 2
2022-02-24 23:27:09 +08:00

55 lines
1.2 KiB
Plaintext

// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
#include <common>
struct StandardVertInput {
highp vec4 position;
vec3 normal;
vec4 tangent;
};
layout(location = 0) in vec3 a_position;
layout(location = 1) in vec3 a_normal;
layout(location = 2) in vec2 a_texCoord;
layout(location = 3) in vec4 a_tangent;
#if USE_INSTANCING
in vec4 a_matWorld0;
in vec4 a_matWorld1;
in vec4 a_matWorld2;
#if USE_LIGHTMAP
in vec4 a_lightingMapUVParam;
#endif
#if CC_RECEIVE_SHADOW
in vec2 a_localShadowBias; // x:shadow bias, y:shadow normal bias.
#endif
#elif USE_BATCHING
in float a_dyn_batch_id;
#endif
#if CC_USE_MORPH
#if __VERSION__ < 450
in float a_vertexId;
int getVertexId() {
return int(a_vertexId);
}
#else
int getVertexId() {
return gl_VertexIndex; // vulkan convension
}
#endif
#endif
#if CC_USE_SKINNING
#if __VERSION__ > 310
// strictly speaking this should be u16vec4, but due to poor driver support
// somehow it seems we can get better results on many platforms using u32vec4
layout(location = 4) in u32vec4 a_joints;
#else
#pragma format(RGBA16UI)
layout(location = 4) in vec4 a_joints;
#endif
layout(location = 5) in vec4 a_weights;
#endif