Skip to content

Commit c6ce5aa

Browse files
authored
Merge pull request #11798 from CesiumGS/webgl1-parameter-qualifiers
Fix demodernizeShader to preserve parameter qualifiers
2 parents 57f0e15 + 8f4472b commit c6ce5aa

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
### 1.115 - 2024-03-01
4+
5+
#### @cesium/engine
6+
7+
##### Fixes :wrench:
8+
9+
- Fixed a bug affecting voxel shader compilation in WebGL1 contexts. [#11798](https://github.com/CesiumGS/cesium/pull/11798)
10+
311
### 1.114 - 2024-02-01
412

513
#### @cesium/engine

packages/engine/Source/Renderer/demodernizeShader.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ function demodernizeShader(input, isFragmentShader) {
2626

2727
if (isFragmentShader) {
2828
// Replace the in with varying.
29-
output = output.replaceAll(/(in)\s+(vec\d|mat\d|float)/g, `varying $2`);
29+
output = output.replaceAll(
30+
/\n\s*(in)\s+(vec\d|mat\d|float)/g,
31+
`\nvarying $2`
32+
);
3033

3134
if (/out_FragData_(\d+)/.test(output)) {
3235
output = `#extension GL_EXT_draw_buffers : enable\n${output}`;

0 commit comments

Comments
 (0)