Replace the ad-hoc `resolveGenericReturnType` switch with an explicit
data-driven generic family system. Each family (GenType, GVec4,
GSampler2D, ...) declares its members and the dimension it varies along
(Size / Prefix); overload resolution locks an index per dimension while
walking arguments and projects return families through that lock.
This fixes the underlying defect that produced the texture/textureCube
bugs: the previous algorithm assumed "return family == parameter family"
and collapsed `GVec4 <- GSampler2D` to `SAMPLER2D`. Cross-family
projection (sampler → gvec4) is now a native operation, so the
textureCube/textureCubeLod/texture2D/texture2DLod overloads that the
initial fix listed as concrete-only entries can be written as plain
generic signatures again.
Return type falls through as `TypeAny` when no argument locks the
dimension (all args are TypeAny), preserving wildcard-compatible
overload resolution downstream.
Also exercises the Verbose semantic pass in the two new test shaders —
the initial fix registered them under Release only, which skips
semantic analysis and therefore could not catch the bug it was meant
to prevent.
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>