Single-root GLTF scenes no longer wrap the root node in a GLTF_ROOT
container, which avoids redundant nesting and fixes animation path
resolution for models like Mixamo characters.
- GLTFSceneParser: single-root scenes use the node directly as scene root
- GLTFAnimationParser: remove single-root path prefixing (no longer needed)
- Entity.findByPath: prefer real same-name child over legacy self-name prefix
- Add AGENTS.md to .gitignore
Remove single-root vs multi-root branching in GLTFSceneParser, always
creating a GLTF_ROOT wrapper entity. This ensures animation bone paths
are consistent across different glTF files, fixing cross-file animation
clip retargeting.
Verify that screenPointToRay and viewport-world round-trip produce
correct results when the camera inherits non-identity scale from a
parent entity. Without the fix, the round-trip deviates by the
inherited scale factor (e.g. 105 -> 107.5 at scale 1.5).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GLES100 visitJumpStatement converted `return expr;` to `gl_FragColor = expr`
without a trailing semicolon, causing WebGL compilation errors. Only triggered
when fragment entry returns vec4 (Cocos pattern), not void (standard Galacean).
- Suppress `uniform` output for global struct-typed variables (e.g. `Varyings o;`)
- Register global struct vars in both per-function and cross-stage maps
- Unify macro member access scanning into callback-based _forEachMacroMemberAccess
- Add registerStructVar() encapsulation in VisitorContext
- Add Cocos VSOutput pattern test (global-varying-var)
Build a combined _globalStructVarMap in visitShaderProgram by scanning
both vertex and fragment entry functions, so global #define values like
`attr.POSITION` or `o.v_uv` are correctly transformed in all stages.
Rewrite define-struct-access tests to use snapshot file comparison
against expected/ GLSL outputs for clearer verification.
Add assertions for macro usage in expressions (not just #define transformation):
- Macro as RHS in multiplication, as LHS in assignment
- Macro as function argument in dot(), texture2D()
- Multiple varying properties (v_uv, v_normal) referenced via #define
Verify the actual CodeGen output instead of just checking GLSL compilation:
- #define values with struct member access are correctly transformed
- varying/attribute declarations are emitted for referenced properties
When #define values contain struct member access like `o.v_uv` (where `o` is
a Varyings/Attributes/MRT struct variable), the CodeGen now correctly transforms
them to just the property name (e.g. `v_uv`), matching the behavior of direct
struct member access in regular code. Closes#2944.
When a builtin generic function (e.g. normalize) receives TypeAny args,
resolvedReturnType stays TypeAny. Previously the else branch returned
the raw EGenType enum value (200), which is neither a concrete type nor
a wildcard, causing downstream user-function overload matching to fail.
- Simplify resolveGenericReturnType: remove genericParamType param, only
check if return type is GVec4
- Fix textureCube/textureCubeLod return type: SAMPLER_CUBE → VEC4
- Add missing texture2DLod builtin function registration
- Add texture2DLod test cases to texture-generic.shader
texture(sampler2D, vec2) returns GVec4 which was incorrectly resolved to
the sampler type instead of vec4, causing "No overload function type found"
when passing the result to user-defined functions like decode32(vec4).
Add resolveGenericReturnType() to correctly map GSampler* → GVec4:
sampler2D/sampler3D/samplerCube → vec4
isampler2D/isampler3D/... → ivec4
usampler2D/usampler3D/... → uvec4
- Remove project-loader e2e case (depends on outdated project.json with Environment type)
- Remove project-loader unit test from ResourceManager.test.ts
- Convert ambientLight test data to new GLCN header format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>