gllllll commited on
Commit
5f91f29
·
verified ·
1 Parent(s): 23b10f5

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,41 +1,91 @@
1
- ---
2
- language:
3
- - en
4
- - code
5
- license: other
6
- task_categories:
7
- - text-generation
8
- tags:
9
- - opengl
10
- - glsl
11
- - webgl
12
- - shaders
13
- - computer-graphics
14
- - 3d
15
- - vulkan
16
- - game-engine
17
- - pbr
18
- - raymarching
19
- - atmospheric-scattering
20
- - ocean-fft
21
- - voxel-cone-tracing
22
- - oit
23
- - path-tracing
24
- - code-generation
25
- size_categories:
26
- - 1K<n<10K
27
- ---
28
-
29
- # GLSL/OpenGL Production, Educational & Hidden Gems Dataset
30
-
31
- A state-of-the-art curated dataset across 7,201 shader pipelines from 60 major production engines (Google Filament, Godot, bgfx, raylib, Magnum, Sokol, Babylon.js, PlayCanvas, WickedEngine, Ogre3D, DiligentEngine) and legendary Hidden Gems (Bruneton Atmospheric Scattering, Tessendorf Ocean FFT, Voxel Cone Tracing, Order-Independent Transparency, GPU Path Tracing).
32
-
33
- Every shader is statically verified with Khronos `glslangValidator`, disassembled and profiled with Khronos SPIR-V bytecode analysis, and enriched with mathematical formulations, synthetic bug-fix pairs, and Chain-of-Thought reasoning.
34
-
35
- ## Dataset Statistics
36
- - **Total Projects / Samples**: 7,201
37
- - **Permissive Partition**: 7,074 (`dataset_permissive.jsonl`)
38
- - **Non-Commercial Partition**: 127 (`dataset_noncommercial.jsonl`)
39
- - **Total Shader Files**: 18,124
40
- - **Valid GLSL Rate**: 10,574 / 18,124
41
- - **Visual Previews & Render Targets**: 390 images
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - code
5
+ license: other
6
+ task_categories:
7
+ - text2text-generation
8
+ - text-generation
9
+ tags:
10
+ - opengl
11
+ - glsl
12
+ - webgl
13
+ - shaders
14
+ - computer-graphics
15
+ - 3d
16
+ - vulkan
17
+ - code-generation
18
+ size_categories:
19
+ - 1K<n<10K
20
+ ---
21
+
22
+ # GLSL/OpenGL Educational Dataset for AI Training
23
+
24
+ A curated, statically validated, and educational dataset of GLSL shaders, OpenGL 3.3/4.x programs, WebGL/WebGL2 demos, and procedural graphics pipelines.
25
+
26
+ ## Key Features
27
+
28
+ - **Multi-Stage GLSL**: Vertex, Fragment, Compute, Geometry, and Tessellation shaders.
29
+ - **Static Validation**: All shaders validated against Khronos `glslangValidator` (GLSL 1.00 ES up to GLSL 4.60 & SPIR-V).
30
+ - **Inline Extraction**: Shaders extracted from C++ host code, raw string literals, `ssgl` lambdas, and WebGL JavaScript/HTML applications.
31
+ - **Rich Annotations**: Includes GLSL dialect version, comment density, topic tagging (PBR, raymarching, lighting, compute, etc.), and complexity classification.
32
+ - **License Partitioning**: Permissive (MIT, Apache-2.0, BSD, CC0) vs Non-Commercial partitions.
33
+ - **Visual Previews**: High-quality screenshot previews linked to shader code.
34
+
35
+ ## Dataset Structure & Splits
36
+
37
+ - `dataset_permissive.jsonl`: Clean, permissive open source licenses (MIT, Apache 2.0, BSD, CC0, Unlicense, Zlib).
38
+ - `dataset_noncommercial.jsonl`: Non-commercial educational content (CC-BY-NC-4.0, Shadertoy CC-BY-NC-SA-3.0).
39
+ - `dataset_full.jsonl`: Complete aggregated corpus.
40
+
41
+ ## Schema Specification
42
+
43
+ Each record in JSONL contains:
44
+
45
+ ```json
46
+ {
47
+ "id": "webgl_examples_bumpmapping",
48
+ "source": "https://github.com/damdoy/webgl_examples",
49
+ "source_commit": "b2c0c53...",
50
+ "collected_at": "2026-08-17T13:02:12+00:00",
51
+ "source_type": "repo",
52
+ "title": "Bumpmapping",
53
+ "api": "WebGL",
54
+ "glsl_version": "100",
55
+ "topic": "raymarching/texturing/bumpmapping/basics",
56
+ "difficulty": "advanced",
57
+ "files": [
58
+ {
59
+ "path": "bumpmapping/plane.js#[inline_1_vertex]",
60
+ "language": "glsl",
61
+ "stage": "vertex",
62
+ "loc": 18,
63
+ "comment_density": 0.0,
64
+ "code": "attribute vec4 vertex_pos;\n...",
65
+ "validation_status": "valid"
66
+ }
67
+ ],
68
+ "validation": {
69
+ "glslang_valid": 2,
70
+ "invalid": 0,
71
+ "unverified": 0,
72
+ "has_ubo_or_ssbo": false,
73
+ "texture_samplers": 1
74
+ },
75
+ "preview_image": "images/webgl_examples_bumpmapping.png",
76
+ "license": "MIT",
77
+ "non_commercial": false,
78
+ "comment_density": 0.054,
79
+ "dedup_hash": "4efd6250c8b26922"
80
+ }
81
+ ```
82
+
83
+ ## Usage Example
84
+
85
+ ```python
86
+ from datasets import load_dataset
87
+
88
+ dataset = load_dataset("json", data_files={"train": "dataset_permissive.jsonl"})
89
+ print(dataset["train"][0]["title"])
90
+ print(dataset["train"][0]["files"][0]["code"])
91
+ ```
dataset_full.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d1ed5c70c5569eeb0a3ff8c5273fa655cc4cd6defc6462f8fb1b742e9c8b71e2
3
- size 750736090
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83bd3930dd9bfe79dd4370df95ed489a94c4a0f16798ac10f6d7c685e2f85b2a
3
+ size 102793
dataset_full.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:49fa834ecc28ebad9fea044c6457d7745e0350518927689cabdd98336dc2aca2
3
- size 128726168
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72bd03da6297b2dcbc059089721a6f42992a2d69fe0a6dccaeb48fcb940950a2
3
+ size 33993
dataset_noncommercial.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
dataset_permissive.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:66248b71d2fdd26c498681d09d3ac6a850921a103740960c7475af558058dcf9
3
- size 745303769
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83bd3930dd9bfe79dd4370df95ed489a94c4a0f16798ac10f6d7c685e2f85b2a
3
+ size 102793
dataset_permissive.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b8a015ed1329274c48738db47de4320caeb89ac74b8764cf5bb7112809692ef0
3
- size 127988514
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72bd03da6297b2dcbc059089721a6f42992a2d69fe0a6dccaeb48fcb940950a2
3
+ size 33993
sample.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e300b22f25bc462e415de1448b460f73dd0cb378e29ccdd35dc096a999298ce3
3
- size 7431033
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83bd3930dd9bfe79dd4370df95ed489a94c4a0f16798ac10f6d7c685e2f85b2a
3
+ size 102793