File size: 4,945 Bytes
eb3a924
 
 
 
 
8ae9d9e
 
 
 
 
 
 
 
 
 
 
 
 
eb3a924
 
 
 
 
 
8ae9d9e
eb3a924
2d7c416
eb3a924
274eb4d
 
eb3a924
eac5e84
274eb4d
6bb952f
274eb4d
 
eb3a924
 
 
eac5e84
 
cc12c40
39120f8
e525d37
 
 
 
eb3a924
cc12c40
39120f8
178fe69
 
 
 
 
30f89bd
39120f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e525d37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39120f8
 
 
cc12c40
30f89bd
39120f8
 
 
30f89bd
39120f8
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: author
    dtype: string
  - name: date
    dtype: timestamp[ns]
  - name: image_code
    dtype: string
  - name: license
    dtype: string
  - name: func_bytes
    sequence: int64
  - name: functions
    sequence:
      sequence: int64
  - name: comment
    dtype: string
  - name: header
    dtype: string
  - name: body
    dtype: string
  - name: model_inp
    dtype: string
  - name: function_frequency
    dtype: int64
  - name: header_frequency
    dtype: int64
  splits:
  - name: test
    num_bytes: 4482957
    num_examples: 467
  download_size: 718866
  dataset_size: 4482957
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
repository: https://github.com/Vipitis/shadertoys-dataset
license: other
task_categories:
- text-generation
tags:
- code
---

## Links 
* repository: https://github.com/Vipitis/shadertoys-dataset
* benchmark task: https://github.com/bigcode-project/bigcode-evaluation-harness/pull/173
* leaderboard/demo/metric: https://huggingface.co/spaces/Vipitis/shadermatch
* results dataset: https://huggingface.co/datasets/Vipitis/Shadereval-results
* runs dataset (gated): https://huggingface.co/datasets/Vipitis/Shadereval-runs

## Dataset description
467 functions as well as their reference programs, from [Shadertoy.com](https://www.shadertoy.com/about). Sourced from the [shaders21k dataset](https://github.com/mbaradad/shaders21k), as well as the public API (for years 2022 and 2023).

Annotated with the following fields:
- id (string): The unique 6 character identifier of the shader program, set by the website when first saving your shader program. To get the source of any shader program can be accessed it via the url `https://www.shadertoy.com/view/<id>`
- author (string): Unige username of the shader program author.
- date (timestamp[ns]) UNIX-timestamp of when this program was first shadered (saved as non private).
- image_coded (string): GLSL-shaderder code of the Image-renderpass.
- license (string): SPDX license identifier (via [scancode-toolkit](https://github.com/aboutcode-org/scancode-toolkit/releases/tag/v32.2.1))
- func_bytes (5tuple(int)): byte indices for where comment starts, ends, header ends, docstring ends, function ends. Parsed with [tree-sitter-glsl](https://github.com/tree-sitter-grammars/tree-sitter-glsl/releases/tag/v0.1.9)
- functions (list(5tuple(int))): func_bytes for all functions in this program.
- comment (string): author written code comments immediately before the funciton header
- header (string): function header and initial `{`
- body (string): function body
- model_inp (string): comment+header, used for the function completion benchmark
- function_frequency (int): occurances of this function (header+body) in the unfiltered dataset of 202k functions
- header_frequency (int): occurances of this header in the unfiltered dataset of 202k functions

## Citation
Please cite the following when using or expanding upon this dataset.
```bibtex
@INPROCEEDINGS{11028297,
    author={Kels, Jan and Dahou, Abdelhalim Hafedh and Mathiak, Brigitte},
    booktitle={2025 IEEE/ACM International Workshop on Large Language Models for Code (LLM4Code)}, 
    title={Evaluating Language Models for Computer Graphics Code Completion}, 
    year={2025},
    pages={96-103},
    doi={10.1109/LLM4Code66737.2025.00017},
    url={https://doi.org/10.1109/LLM4Code66737.2025.00017}
}
```
A recording of the presentation can be found on the [conference website](https://conf.researchr.org/details/icse-2025/llm4code-2025-papers/13/Evaluating-Language-Models-for-Computer-Graphics-Code-Completion).



## Usage
Exclusively used for a Function Completion benchmark, using the `model_inp` field and evaluated using the shadermatch metric.

## revisions
these are historic revisions used for steps during the development
### [v0.3](https://huggingface.co/datasets/Vipitis/Shadereval-inputs/tree/0.3)
contains 394 functions gathers from shaders20k (years 2013-2021) and the Shadertoy.com API (years 2022-2023). All programs went through a assemble of filters. Then parsed to functions and additional filters were applied.
All functions are run with wgpu-shadertoy using the wgpu-py PR branch that updates to wgpu-native 22.1 [ref](https://github.com/pygfx/wgpu-py/pull/547), and then confirmed to be needed (it errors when the funciton is omitted).
the columns `model_inp` contains the comment just before the function as well as the header.
### [v0.2](https://huggingface.co/datasets/Vipitis/Shadereval-inputs/tree/0.2)
257 functions from shaders20k through various filters ref run with wgpu-py 0.16.0 and wgpu-shadertoy on this commit. Used for input experiments.


# LICENSE information
please look at the `license` column in each row for an SPDX license tag of that individual program. You should also see the exact license text at the beginning of `image_code` as a comment.