galacean / engine

A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF.
https://galacean.antgroup.com/engine
MIT License
4.2k stars 299 forks source link

Fix array index loss after compilation #2111

Closed Sway007 closed 3 months ago

Sway007 commented 3 months ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Fix the array index loss in ShaderLab compilation:

// source
vec3 tangentW = v.TBN[0];

compiled

// before
vec3 tangentW = TBN;

// Fixed
vec3 tangentW = TBN[0];