glslh 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/README.md +4 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
## 📋 `glslh` Changelog
|
|
2
2
|
|
|
3
|
-
### **v1.
|
|
3
|
+
### **v1.1.1** (Latest)
|
|
4
|
+
|
|
5
|
+
- **Documentation & README Refinement**: Updated documentation, architecture diagrams, and release logs to reflect complete structural guides for modular struct-based composition, CPU/GPU division of labor, and extension workflows.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### **v1.1.0**
|
|
10
|
+
|
|
11
|
+
- **Duplicate Function Collision Detection & Overloading Support**: Added automated static analysis to scan included modules and warn developers if conflicting function signatures clash, while fully supporting valid GLSL function overloading distinguished by parameter signatures.
|
|
12
|
+
- **Strict `#version` Directive Pinning**: Upgraded the preprocessor parsing pipeline to extract and pin `#version` directives to the absolute top of the generated string, ensuring full compliance with strict WebGL driver standards regardless of auto-injected uniform declarations or math constants.
|
|
13
|
+
- **Enhanced Error Line Mapping**: Improved error translation utilities to map monolithic WebGL compilation error line numbers back to their exact source file and line number (`[shape_utils.glsl:14]`).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
### **v1.0.1**
|
|
4
18
|
|
|
5
19
|
- **Strict File Extension Whitelisting**: Added validation checks inside `GLSLHParser` to restrict `#include` directives exclusively to valid shader extensions (`.glsl`, `.glslh`, `.frag`, `.vert`, `.frag.glsl`, `.vert.glsl`), preventing security risks and unauthorized inclusions of non-shader files (e.g., `.py`, `.cpp`, `.txt`).
|
|
6
20
|
- **Compound Header Support**: Enhanced path checking to natively support complex shader extension combinations like `.frag.glslh` and `.vert.glslh`.
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
- **Clear CPU/GPU Separation:** All orchestration, math constant calculations (`Math.PI`), and uniform state updates run efficiently on the **CPU**, while heavy rasterization and pixel shading run natively in parallel on the **GPU**.
|
|
40
40
|
- **Zero Runtime Performance Cost:** Because modular files are stitched and compiled once during initialization, your shaders execute at full native GPU speed with zero runtime overhead.
|
|
41
41
|
- **C-Style `#include` Directives:** Split massive shaders into modular files with full circular dependency protection and strict extension validation.
|
|
42
|
-
- **Duplicate Function Collision Detection:** Automatically scans included modules and warns you if multiple files define conflicting function signatures (`float hash()`) before WebGL compilation fails.
|
|
42
|
+
- **Duplicate Function Collision Detection:** Automatically scans included modules and warns you if multiple files define conflicting function signatures (`float hash()`) before WebGL compilation fails, while fully supporting valid GLSL function overloading.
|
|
43
43
|
- **Error Line Mapping:** Instantly translates monolithic WebGL compilation error line numbers back to their exact source file and line number (`[shape_utils.glsl:14]`).
|
|
44
44
|
- **Self-Contained Metadata Blocks:** Define uniform data types, default values, and derived per-frame formulas right at the top of your shader file (`@uniforms`).
|
|
45
45
|
- **Direct JavaScript Math Injection:** Use native JS constants like `Math.PI` or `Math.TAU` directly in your GLSL code; the preprocessor evaluates them before GPU compilation.
|
|
@@ -93,22 +93,18 @@ package/
|
|
|
93
93
|
## 🚀 Installation & Quick Start
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
npm install glslh
|
|
96
|
+
npm install glslh@1.1.1
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
### 1. Create a `.glslh` Shader File (`./shaders/header.glslh`)
|
|
100
100
|
|
|
101
|
-
Refer to the complete working example setup here: [GLSLH](https://www.google.com/search?q=./test/shaders/header.glslh)
|
|
102
|
-
|
|
103
101
|
### 2. Run Declaratively in HTML (`index.html`)
|
|
104
102
|
|
|
105
|
-
Refer to the complete working example setup here: [index.html](https://www.google.com/search?q=./test/index.html)
|
|
106
|
-
|
|
107
103
|
---
|
|
108
104
|
|
|
109
105
|
## ⚡ VS Code Extension (Live Preview)
|
|
110
106
|
|
|
111
|
-
Want instant syntax highlighting, color pickers, and a live WebGL preview pane right inside your editor? Install the official **GLSLH Previewer** extension from the marketplace:
|
|
107
|
+
Want instant syntax highlighting, color pickers, and a live WebGL preview pane right inside your editor? Install the official [**GLSLH Previewer**](https://marketplace.visualstudio.com/items?itemName=SudhanshuAmbastha.glslh-previewer) extension from the marketplace:
|
|
112
108
|
|
|
113
109
|
- **Live WebGL Preview:** Inspect shaders side-by-side with automatic hot-reloading on save.
|
|
114
110
|
- **Native Color Pickers:** Click color definitions or uniform arrays in `@uniforms` or `vec3()` blocks to adjust values visually.
|
|
@@ -118,4 +114,4 @@ Want instant syntax highlighting, color pickers, and a live WebGL preview pane r
|
|
|
118
114
|
|
|
119
115
|
## 📜 License
|
|
120
116
|
|
|
121
|
-
Distributed under the
|
|
117
|
+
Distributed under the **MIT License**. See [`LICENSE`](../LICENSE) for more information.
|