Benchmark GLSL
Enter GLSL tests below and they will be benchmarked against each other; measuring how fast each one runs. Refer to About for how to properly write tests.
Run TestsAdd Test
Delete
ExportImportShareAbout
Copyright Ethan Alexander Shulman 2023
Shareable URLBackCopy to Clipboard
Benchmark GLSLBack
Created by Ethan Alexander Shulman
Benchmark GLSL is a small app that allows you to compare the performance of different GLSL code snippets when running as a fragment shader.
This app is completely local, none of your code is sent to a server even when you use the Share function.
This app is open source released under the MIT license.
Download Source Code
v0 August 12, 2023 - Initial release.
Writing Proper Tests
The GLSL compiler is very optimized including dead code elimination and constant statment preprocessing, you need to keep this in mind when writing tests to ensure your code isn't being optimized out.
To ensure your code statements aren't constant you must use seed.xyz(Exec function argument) as input for your test calculations, these are real values from 0.0 to 1.0(exclusive)
where x = pixel x, y = pixel y, z = frame. Dead code is anything not contributing to the output(Exec return value), return the sum/dot/length of the final computed values to prevent dead code.
Copyright Ethan Alexander Shulman 2023