All Projects → Gui-Yom → nuance

Gui-Yom / nuance

Licence: Apache-2.0 license
A tool to run your shaders on the gpu. Also a good demo application for wgpu-rs.

Programming Languages

rust
11053 projects
GLSL
2045 projects

Projects that are alternatives of or similar to nuance

Processingstuff
Various pretty-ish Processing sketches by Blokatt. About 50% shaders.
Stars: ✭ 153 (+488.46%)
Mutual labels:  glsl, shader
Godot 3 2d Crt Shader
A 2D shader for Godot 3 simulating a CRT
Stars: ✭ 183 (+603.85%)
Mutual labels:  glsl, shader
Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (+496.15%)
Mutual labels:  glsl, shader
glsl-editor
💾 A simple WebGL shader editor
Stars: ✭ 20 (-23.08%)
Mutual labels:  glsl, shader
shaderplace
Real-time collaborative GLSL livecode editor
Stars: ✭ 43 (+65.38%)
Mutual labels:  glsl, shader
Glslang
Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Stars: ✭ 2,034 (+7723.08%)
Mutual labels:  glsl, shader
Spirv Vm
Virtual machine for executing SPIR-V
Stars: ✭ 173 (+565.38%)
Mutual labels:  glsl, shader
Three.meshline
Mesh replacement for THREE.Line
Stars: ✭ 1,644 (+6223.08%)
Mutual labels:  glsl, shader
Simplegodotcrtshader
A simple Godot shader that simulates CRT Displays
Stars: ✭ 236 (+807.69%)
Mutual labels:  glsl, shader
Godot Realistic Water
Godot - Realistic Water Shader
Stars: ✭ 235 (+803.85%)
Mutual labels:  glsl, shader
Godot Cel Shader
A Cel Shader for the Godot Engine
Stars: ✭ 145 (+457.69%)
Mutual labels:  glsl, shader
osgw
Real-Time Ocean Animation with Gerstner Waves
Stars: ✭ 51 (+96.15%)
Mutual labels:  glsl, shader
Unity Lowpoly Shader
Unity Shader for mesh rendering in lowpoly style
Stars: ✭ 116 (+346.15%)
Mutual labels:  glsl, shader
frag3d.js
WebGL shader tools
Stars: ✭ 58 (+123.08%)
Mutual labels:  glsl, shader
Unlitclouds
A unity cloud shader, using vertex colors and tessellation for a simple stylized look.
Stars: ✭ 110 (+323.08%)
Mutual labels:  glsl, shader
Shader Printf
Simple printf functionality for GLSL.
Stars: ✭ 170 (+553.85%)
Mutual labels:  glsl, shader
Godot Particle Dof
Bokeh-esque particle depth of field in Godot 3.0
Stars: ✭ 77 (+196.15%)
Mutual labels:  glsl, shader
Sky Shader
☀️ WebGL sky and sun shader editor
Stars: ✭ 90 (+246.15%)
Mutual labels:  glsl, shader
Magicshader
🔮 Tiny helper for three.js to debug and write shaders
Stars: ✭ 205 (+688.46%)
Mutual labels:  glsl, shader
wgpu-profiler
Simple profiler scopes for wgpu using timer queries
Stars: ✭ 45 (+73.08%)
Mutual labels:  wgpu, wgpu-rs

Nuance

Crates.io Crates.io

A tool to run your shaders on the gpu.

screenshot Loaded with example shader : shaders/demo/foamy_water.frag Made by k-mouse ( 2016-11-23) https://www.shadertoy.com/view/llcXW7

Installation

Install with cargo:

$ cargo install --locked nuance

See Development when building from source.

Or download a prebuilt binary from the Release page. Prebuilt binaries are currently available for Windows (x86_64-pc-windows-msvc) and Linux (x86_64-unknown-linux-gnu).

Usage

Run it as is or nuance -H to force using the best gpu on your machine. By default, nuance selects the less power-hungry gpu.

Shaders

Nuance allows you tu run a custom fragment shader. You can also use a shader already compiled to SpirV directly given it was compiled with the Nuance header.

See the complete list of changes from GLSL in the manual.

Custom parameters

You can specify additional parameters to your shader using a special interface block. When compiling your shader, parameters will be parsed from the source code to generate sliders and other appropriate UI elements. The shader source will then be transpiled to correct GLSL to be compiled. Example :

// layout(params) indicates that this block is the special one to be parsed.
layout(params) uniform Params {
// layout(min, max, init) to modify each parameters settings
    layout(min = 0, max = 100, init = 1) float fSlider0;
    layout(min = 0, max = 20) float fSlider1;
};

void main() {
    // You can use special values like <param>.min and <param>.max, they will be replaced by the settings defined
    // in the params block
    fragColor = vec4(fSlider0 / fSlider0.max, fSlider1 / fSlider1.max, 0.0, 1.0);
}

Why this implementation for specifying parameters ?

"Hijacking" the layout qualifier allows me to use an existing GLSL parser. It parses those qualifiers as arbitrary identifiers which permits great flexibility.

Examples

This repository includes some examples under shaders/. Some of these are not from me and are just included here for demonstration purposes. They are the property of their respective owners.

Development

We use shaderc-rs to compile GLSL shaders to spirv. It is therefore highly recommended to install the vulkan sdk and set the VULKAN_SDK env var in order to find the prebuilt shaderc libraries. If not, shaderc will download and build the vulkan libraries from source, which takes about 90% of this entire application build time.

TODO

Ideas and tasks I should work on in no particular order.

  • Merge params uniform block with push_constant block
  • Preprocessor error handling & reporting
  • Complete error handling (currently crashes if something goes wrong)
  • GPU hot switch (for when you need some extra gpu juice on the fly)
  • Bind textures as input
  • Bind buffers as output
  • Sound processing (in and out)
  • Save to gif or video
  • Load shaders directly from shadertoy.com (need to convert globals)
  • Shader editor (code editor, GLSL highlighting)
  • Small standard library for GLSL shaders with common functions
  • Custom additions to GLSL language built into the preprocessor for a more fluent language
  • Custom parser for glsl
  • Support rust-gpu shaders
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].