mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
0ecaa8db51
* add surface shader * remove unused item * arrange main-functions * arrange main-functions * fix compatible lighting mode
53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
//IA Input
|
|
layout(location = 0) in vec3 a_position;
|
|
layout(location = 1) in vec3 a_normal;
|
|
layout(location = 2) in vec2 a_texCoord;
|
|
#if CC_SURFACES_USE_TANGENT_SPACE
|
|
layout(location = 3) in vec4 a_tangent;
|
|
#endif
|
|
|
|
#if CC_SURFACES_USE_VERTEX_COLOR
|
|
in vec4 a_color;
|
|
#endif
|
|
|
|
#if CC_SURFACES_USE_SECOND_UV || CC_SURFACES_USE_LIGHT_MAP
|
|
in vec2 a_texCoord1;
|
|
#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
|
|
|
|
#if CC_SURFACES_USE_INSTANCING
|
|
#if CC_USE_BAKED_ANIMATION
|
|
in highp vec4 a_jointAnimInfo; // frameID, totalJoints, offset
|
|
#endif
|
|
in vec4 a_matWorld0;
|
|
in vec4 a_matWorld1;
|
|
in vec4 a_matWorld2;
|
|
#if CC_SURFACES_USE_LIGHT_MAP
|
|
in vec4 a_lightingMapUVParam;
|
|
#endif
|
|
#if CC_RECEIVE_SHADOW
|
|
in vec2 a_localShadowBias; // x:shadow bias, y:shadow normal bias.
|
|
#endif
|
|
#elif CC_SURFACES_USE_BATCHING
|
|
in float a_dyn_batch_id;
|
|
#endif
|
|
|
|
|
|
#if CC_USE_MORPH
|
|
#if __VERSION__ < 450
|
|
in float a_vertexId;
|
|
#endif
|
|
#endif
|