Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(cocos): a converted effect reads the tangent varying the engine fragment prelude declares, instead of declaring it again

yhhe81b485e102b
diff --git a/pipeline/src/import/cocos/effectConvert.ts b/pipeline/src/import/cocos/effectConvert.ts
index 3bd7c5218..40a827900 100644
--- a/pipeline/src/import/cocos/effectConvert.ts
+++ b/pipeline/src/import/cocos/effectConvert.ts
@@ -268,7 +268,6 @@ in highp vec2 v_texCoord1;
#endif`;
const TANGENT_VARYING = `#ifdef MESH_TANGENTS
-in highp vec4 v_worldTangent;
#define cocos_tangent v_worldTangent
#else
#define cocos_tangent vec4(1.0, 0.0, 0.0, 1.0)