KhronosGroup / KhronosGroup/GLSL
Clarify scalar constructor with non-scalar values.
- Dominant language
- JavaScript
- Stars
- 458
- Forks
- 114
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
Constructor section of the spec says:
> Scalar constructors with non-scalar parameters can be used to take the first element from a non-scalar.
It does not appear to list _which_ non-scalar types are allowed. From testing in GLSLang it seems that `vec` and `mat` types can be used, but `array` and `struct` types cannot.
Should the spec be clarified to say `vector or matrix` instead of just `non-scalar` ?
Contributor guide
Research direction
Start with the Constructor section of the GLSL specification and compare its wording with the observed GLSLang behavior for vector, matrix, array, and struct arguments. Confirm which non-scalar types are permitted, then clarify the specification so the allowed types and first-element behavior are explicit.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100