Socket
Socket
Sign inDemoInstall

shaderhud

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shaderhud

Easily modify WebGL shaders with a canvas HUD


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

This package displays a shader editor over your <canvas> that lets you modify the GLSL code in any running WebGL 2.0 app. This makes it easy to perform experiments and diagnostics.

Shaderhud is fairly robust at collecting shaders for viewing purposes, but the shader editing feature only works with certain rendering engines that use uniform blocks (e.g. Filament).

There are many limitations to shader editing due to the fact that WebGL doesn't allow shaderhud to glean information from a WebGLUniformLocation object.

To inject shaderhud, first paste this into your browser's developer console:

const script = document.createElement('script');
script.src = '//unpkg.com/shaderhud';
document.head.appendChild(script);

Next you need to activate the widget by calling the shaderhud() function, passing in your canvas element and context. Here's an example for a Filament app:

const canvas = document.getElementsByTagName('canvas')[0];
shaderhud(canvas, Filament.ctx);

FAQs

Package last updated on 11 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc