All Projects → dmnsgn → glsl-conditionals

dmnsgn / glsl-conditionals

Licence: MIT License
Functions designed to avoid conditionals ported to glslify

Programming Languages

GLSL
2045 projects

Projects that are alternatives of or similar to glsl-conditionals

sph opengl
SPH simulation in OpenGL compute shader.
Stars: ✭ 57 (+7.55%)
Mutual labels:  glsl
ios-spritekit-shader-sandbox
👾 Collection of custom effects for SpriteKit implemented using GLSL/Metal shaders.
Stars: ✭ 63 (+18.87%)
Mutual labels:  glsl
Fake-Interior-Shader-for-GodotEngine
Interior Mapping shader for the Godot Game Engine 3.x that works with both GLES3 and GLES2.
Stars: ✭ 40 (-24.53%)
Mutual labels:  glsl
parametric surfaces
Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.
Stars: ✭ 43 (-18.87%)
Mutual labels:  glsl
ShaderView
ShaderView is an Android View that makes it easy to use GLSL shaders for your app. It's the modern way to use shaders for Android instead of RenderScript.
Stars: ✭ 53 (+0%)
Mutual labels:  glsl
deffx
A collection of useful shader effects made ready to be used with the Defold game engine
Stars: ✭ 33 (-37.74%)
Mutual labels:  glsl
limitless-engine
OpenGL C++ Graphics Engine
Stars: ✭ 95 (+79.25%)
Mutual labels:  glsl
inline-spirv-rs
Compile GLSL/HLSL/WGSL and inline SPIR-V right inside your crate.
Stars: ✭ 21 (-60.38%)
Mutual labels:  glsl
Paint3D
A program allowing painting textures of different channels SIMULTANEOUSLY on a 3d model
Stars: ✭ 24 (-54.72%)
Mutual labels:  glsl
glazejs
A high performance 2D game engine built in Typescript
Stars: ✭ 96 (+81.13%)
Mutual labels:  glsl
kotlin-glsl
Write your GLSL shaders in Kotlin.
Stars: ✭ 30 (-43.4%)
Mutual labels:  glsl
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+343.4%)
Mutual labels:  glsl
ofxDeferredShading
an openFrameworks addon for shading, lighting, lens simulation.
Stars: ✭ 78 (+47.17%)
Mutual labels:  glsl
music visualizer
Shader viewer / music visualizer for Windows and Linux
Stars: ✭ 137 (+158.49%)
Mutual labels:  glsl
MRIcroGL
v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
Stars: ✭ 101 (+90.57%)
Mutual labels:  glsl
YdarWallpaper
opengl渲染的动态桌面壁纸
Stars: ✭ 65 (+22.64%)
Mutual labels:  glsl
Voxel
Sandbox survival game created with Light Engine (Development halted due to other projects)
Stars: ✭ 18 (-66.04%)
Mutual labels:  glsl
30-days-of-shade
30 days of shaders in GLSL using GLSLCanvas
Stars: ✭ 134 (+152.83%)
Mutual labels:  glsl
ShaderBoiler
Aimed to eliminate preprocessor hell in shaders and kernels.
Stars: ✭ 30 (-43.4%)
Mutual labels:  glsl
GLSLShaderShrinker
Optimizes the size of GLSL shader code.
Stars: ✭ 39 (-26.42%)
Mutual labels:  glsl

glsl-conditionals experimental

Daniel Holden's functions designed to avoid conditionals in GLSL, available as a module for glslify.

Usage

NPM

// Comparisons
#pragma glslify: when_eq = require(glsl-conditionals/when_eq)
#pragma glslify: when_neq = require(glsl-conditionals/when_neq)

#pragma glslify: when_gt = require(glsl-conditionals/when_gt)
#pragma glslify: when_lt = require(glsl-conditionals/when_lt)

#pragma glslify: when_ge = require(glsl-conditionals/when_ge)
#pragma glslify: when_le = require(glsl-conditionals/when_le)

// Logical operators
#pragma glslify: when_and = require(glsl-conditionals/when_and)
#pragma glslify: when_or = require(glsl-conditionals/when_or)
#pragma glslify: when_xor = require(glsl-conditionals/when_xor)
#pragma glslify: when_not = require(glsl-conditionals/when_not)
attribute float x;

// ...

y += 5.0 * when_eq(x, .0)

License

MIT. See license file.

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].