Documentation
¶
Overview ¶
gosl translates Go source code into WGSL compatible shader code. Use //gosl:start and //gosl:end to bracket code to generate.
pass filenames or directory names for files to process.
Usage:
gosl [flags] [path ...]
The flags are:
-debug enable debugging messages while running -exclude string comma-separated list of names of functions to exclude from exporting to WGSL (default "Update,Defaults") -keep keep temporary converted versions of the source files, for debugging -out string output directory for shader code, relative to where gosl is invoked -- must not be an empty string (default "shaders")
Directories
¶
| Path | Synopsis |
|---|---|
|
package alignsl performs 16-byte alignment checking of struct fields and total size modulus checking of struct types to ensure WGSL (and GSL) compatibility.
|
package alignsl performs 16-byte alignment checking of struct fields and total size modulus checking of struct types to ensure WGSL (and GSL) compatibility. |
|
examples
|
|
|
basic
command
This example just does some basic calculations on data structures and reports the time difference between the CPU and GPU.
|
This example just does some basic calculations on data structures and reports the time difference between the CPU and GPU. |
|
rand
command
Code generated by "goal build"; DO NOT EDIT.
|
Code generated by "goal build"; DO NOT EDIT. |
|
package slbool defines a WGSL friendly int32 Bool type.
|
package slbool defines a WGSL friendly int32 Bool type. |
|
Package slmath defines special math functions that operate on the cogentcore.org/core/math32 vector, matrix and quaternion types.
|
Package slmath defines special math functions that operate on the cogentcore.org/core/math32 vector, matrix and quaternion types. |
|
Package threading provides a simple parallel run function.
|
Package threading provides a simple parallel run function. |
Click to show internal directories.
Click to hide internal directories.