BabylonJS / BabylonJS/Spector.js

Values for certain types of uniforms within UBOs are shown incorrectly

Open
#277 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
188
Avg merge
12h 47m
Merged PRs (30d)
9

Description

I was using Spector.js Chrome extension to debug our migration to UBOs and stumbled upon this.

We have the following uniform block:

```glsl
layout(std140) uniform DirectLightShadowCastersUBO {
float frustumSplits[3];
int directShadowCastersMask[1];
mat4 directShadowCastersTransforms[3];
};
```

And spector shows the following for frustumSplits
![image](https://github.com/BabylonJS/Spector.js/assets/2968077/abf65662-fe48-4569-8a5a-53ff249796b0)

The displayed value is `0.1683, 0, 0` which is wrong. The last two values shouldn't be zeroes.
I think Spector is ignoring arrayStride here, because when I put some numbers into the buffer one after another I can actually see them in Spector.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.