Shadereval-inputs / README.md
Vipitis's picture
fix formatting
178fe69 verified
metadata
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

Links

Dataset description

467 functions as well as their reference programs, from Shadertoy.com. Sourced from the shaders21k dataset, 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)
  • func_bytes (5tuple(int)): byte indices for where comment starts, ends, header ends, docstring ends, function ends. Parsed with tree-sitter-glsl
  • 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

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

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, 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

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.