bnoazx005 / TDEngine2

TDEngine2 is a cross-platform game engine
Apache License 2.0
18 stars 4 forks source link

[Feature] Add support of introspection of arrays data types within shaders uniform blocks #58

Closed bnoazx005 closed 3 years ago

bnoazx005 commented 3 years ago

Description

The task is actual for both graphics context. Now we can't use arrays inside constant (uniform) buffers. It's caused because of we need to evaluate its length somehow. For D3D11 it's pretty simple, we can use ID3D11ShaderReflection. But for OGL there is no built-in approach, I'm afraid that simple constant evaluation system should be added into CBaseShaderCompiler.