glsl-hsv2rgb - Fast GLSL conversion from HSV color to RGB

  •        54

Fast conversion from HSV color to RGB – published to npm for use with glslify, originally sourced from this post written by Sam Hocevar.All of the values should range between 0 and 1. Returns the calculated RGB value as a vec3.

https://github.com/hughsk/glsl-hsv2rgb

Tags
Implementation
License
Platform

   




Related Projects

glslify - :sparkles: A node.js-style module system for GLSL!

  •    Javascript

It forms one of the core components of the stack.gl ecosystem, allowing you to install GLSL modules from npm and use them in your shaders. This makes it trivial to piece together different effects and techniques from the community, including but certainly not limited to fog, noise, film grain, raymarching helpers, easing functions and lighting models. A full list can be found on the stack.gl packages list under the "Shader Components" category.

FlexiColorPicker - A pure JavaScript color picker - no images, external libraries, CSS or 1px divs.

  •    Javascript

FlexiColorPicker is based on HSV color model. The only two parts of the color picker are therefore the slider for selecting hue value and the picker for selecting saturation and value. Both the slider and picker are HTML elements (usually <div>'s) that serve as wrappers for SVG/VML gradient rectangles. The slider gradient rectangle represents the hue value (gradient with 9 stop-colors). The two overlapping black and white gradient rectangles of the picker represent the saturation and value values. The top level elements (<svg> in case of SVG enabled browser and <div> in case of VML enabled browser) that wrap each of the slider and picker gradient rectangles have set width and height to 100% which means that the color picker components (slider and picker) adjust themselfs automatically to the dimensions of the slider and picker HTML elements. This is the no-hassle form of creating the color picker. This is the recommended call.

glsl-optimizer - GLSL optimizer based on Mesa's GLSL compiler

  •    C++

A C++ library that takes GLSL shaders, does some GPU-independent optimizations on them and outputs GLSL or Metal source back. Optimizations are function inlining, dead code removal, copy propagation, constant folding, constant propagation, arithmetic optimizations and so on. Apparently quite a few mobile platforms are pretty bad at optimizing shaders; and unfortunately they also lack offline shader compilers. So using a GLSL optimizer offline before can make the shader run much faster on a platform like that. See performance numbers in this blog post.

glslCanvas - Simple tool to load GLSL shaders on HTML Canvas using WebGL

  •    Javascript

GlslCanvas is JavaScript Library that helps you easily load GLSL Fragment and Vertex Shaders into an HTML canvas. I have used this in my Book of Shaders and glslEditor. That's all! glslCanvas will automatically load a WebGL context in that <canvas> element, compile the shader and animate it for you.

glslEditor - Simple WebGL Fragment Shader Editor

  •    Javascript

Friendly GLSL Shader editor based on Codemirror compatible with glslViewer (C++/OpenGL ES) and glslCanvas (JS/WebGL). Was originaly develop to work as a embebed editor for The Book of Shaders. But now have grown as a stand alone Web app. Thanks to their compatibility with other apps of this ecosystems like glslViewer that runs in the RaspberryPi directly from console, GlslEditor interact with other projects like OpenFrame.io allowing the user to export the shaders to frames with only one button.


glsl-blend - glsl photoshop blending modes. glslify formatted.

  •    GLSL

Photoshop blending modes in glsl for use with glslify. Blending modes include Screen, Multiply, Soft Light, Vivid Light, Overlay, etc. Implementations sourced from this article on Photoshop math. Blend modes can be imported individually using the standard glslify preprocessor syntax.

glsl-lighting-walkthrough - :bulb: phong shading tutorial with glslify

  •    Javascript

It is not intended as a full-blown beginner's guide, and assumes prior knowledge of WebGL and stackgl rendering. Although it is implemented with stackgl, the same concepts and shader code could be used in ThreeJS and other frameworks. If you have questions, comments or improvements, please post a new issue.

gamma - glsl shaders made simple

  •    Clojure

Gamma is a substrate for graphics software, such as games and data visualization tools. It presents a simple, composable language for representing GLSL shaders. Technically, Gamma is an EDSL that hosts GLSL within Clojurescript. It is inspired by Carlos Scheidegger's Lux and Conal Elliot's Vertigo and Pan. Gamma targets the WebGL subset of the OpenGL ES 1.0 Shading Language. Gamma can be used a la carte to compile shader source, without adopting Clojure/Clojurescript for your runtime application.

ShaderParticleEngine - A GLSL-heavy particle engine for THREE

  •    Javascript

The purpose of this library is to make creating particle effects using THREE.js and WebGL as simple as possible. The heavy-lifting is done by the GPU, freeing up CPU cycles. Emitters are created by first creating an instance of SPE.Group. It is in the group where ShaderMaterial settings are applied, and the texture for all emitters added to that group is set. Multiple groups can be created, but if efficiency is a high-priority then as few groups as possible should be created. The group takes care of uploading emitter data to the GPU for simulation and rendering, so the fewer chunks of data that get sent the better.

ShaderEditorExtension - Google Chrome DevTools extension to live edit WebGL GLSL shaders

  •    Javascript

Alternatively, you can pack the extension yourself and load by dropping the .crx file in the Extensions page.

pickr - Flat, simple, responsive and hackable Color-Picker

  •    Javascript

Be sure to load the pickr.min.js after pickr.min.css. Moreover the script tag doesn't work with the defer attribute. As default color representation is hsva (hue, saturation, value and alpha) used, but you can also convert it to other formats as listed below.

ShaderSketches - KodeLife shader sketches I wrote while commuting

  •    GLSL

This is a repository that stores GLSL shader sketches I created while commuting every day. You can see GIFs of these sketches from my Tumblr. I'm using KodeLife shader editor and GPD Win handheld PC for sketching. In my opinion, this is the best combination of portable development. I created all these sketches while standing in a train.

one-color - An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels

  •    Javascript

Javascript color object with implicit color space conversions. Supports RGB, HSV, HSL and CMYK with alpha channel.

NShader - HLSL - GLSL - CG - Shader Syntax Highlighter AddIn for Visual Studio

  •    

NShader is an extension to Visual Studio 2008/2010/2012 that provides syntax highlighting for various shader languages including HLSL - GLSL - CG.

glslViewer - Live GLSL coding render for MacOS and Linux

  •    C++

Live-coding console tool that renders GLSL Shaders. Every file you use (frag/vert shader, images and geometries) are watched for modification, so they can be updated on the fly. This was tested with Ubuntu 16.04.

tinyrenderers

  •    C++

[2017/11/12] - Added simple tessellation shader sample. Fixed misc issues with pipeline setup for tessellation. [2017/11/10] - Added ChessSet demo. Added geometry shader sample. Fixes to depth stencil handling. [2017/11/10] - Added TexturedCube sample. Updated depth attachment handling on swapchain render pass. Switched out lc_image for stb_image. Added DXC shader build script. [2017/05/27] - Fixed some annoying buffer state transitions. Added build script for shaders. Updated shader naming convention to be more exact. Added OpaqueArgs and PassingArrays for investigation. [2017/05/20] - Updated Append/Consume sample for Vulkan. Requires latest glslang. ConstantBuffer also works for both platforms. [2017/05/13] - Added Linux support. Moved to project files to cmake. Moved glsl shaders to glsl sub directory - forcing HLSL for now. [2017/04/30] - Clarified shader usage in some sample programs to point out which source they're coming from. [2017/04/27] - Added ConstantBuffer sample (D3D12 only for now). Updated Vulkan samples to use negative viewport height. [2017/04/25] - Updated SimpleCompute and StructuredBuffer to work on Vulkan. [2017/04/24] - Added compute samples (D3D12 only for now). One for simple compute and another for structured buffers.

pixi

  •    Javascript

The aim of this project is to provide a fast lightweight 2D library that works across all devices. The PixiJS renderer allows everyone to enjoy the power of hardware acceleration without prior knowledge of WebGL. Also, it's fast. Really fast. PixiJS is a rendering library that will allow you to create rich, interactive graphics, cross platform applications, and games without having to dive into the WebGL API or deal with browser and device compatibility.

XBImageFilters - OpenGL ES 2-based image and real-time camera filters for iOS

  •    Objective-C

XBImageFilters allows you to obtain filtered versions of any image or from the camera in realtime. It uses OpenGL ES 2 to filter the images through fragment shaders you write yourself so you can filter your images in whatever way you want and it is super fast. In this screenshot of the sample we have on the top half of the screen a regular UIImageView with contentMode set to UIViewContentModeTop, and on the bottom half a XBFilteredImageView with the same image with contentMode set to UIViewContentModeBottom and a filter [a GLSL fragment shader] that outputs the luminance of the pixel color.

CSSTint

  •    C++

CSSTint is an utility that allows you to easily change the appearance (i.e. color) of your website, by modifying the CSS file(s) using hue, saturation and lightness modifications (HSV and HSL supported). Parse your CSS file in, tint the colors and save.

color-convert - Plain color conversion functions in JavaScript

  •    Javascript

Simply get the property of the from and to conversion that you're looking for. All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on .raw to the function.