All Projects → ayamflow → Glsl Grid

ayamflow / Glsl Grid

Licence: mit
Draws an antialiased grid along the X/Y/Z direction of a mesh.

Projects that are alternatives of or similar to Glsl Grid

Sky Shader
☀️ WebGL sky and sun shader editor
Stars: ✭ 90 (+57.89%)
Mutual labels:  webgl, glsl, shader
Glsl Worley
Worley noise implementation for WebGL shaders
Stars: ✭ 66 (+15.79%)
Mutual labels:  webgl, glsl, shader
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+20422.81%)
Mutual labels:  webgl, glsl, shader
Three.meshline
Mesh replacement for THREE.Line
Stars: ✭ 1,644 (+2784.21%)
Mutual labels:  webgl, glsl, shader
Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (+171.93%)
Mutual labels:  webgl, glsl, shader
Aladino
🧞‍♂️ Your magic WebGL carpet
Stars: ✭ 225 (+294.74%)
Mutual labels:  webgl, glsl, shader
Magicshader
🔮 Tiny helper for three.js to debug and write shaders
Stars: ✭ 205 (+259.65%)
Mutual labels:  webgl, glsl, shader
Curtainsjs
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.
Stars: ✭ 1,039 (+1722.81%)
Mutual labels:  webgl, glsl, shader
Glchaos.p
3D GPUs Strange Attractors and Hypercomplex Fractals explorer - up to 256 Million particles in RealTime
Stars: ✭ 590 (+935.09%)
Mutual labels:  webgl, glsl
Polygon Shredder
The polygon shredder that takes many cubes and turns them into confetti
Stars: ✭ 686 (+1103.51%)
Mutual labels:  webgl, glsl
Solarsys
Realistic Solar System simulation with three.js
Stars: ✭ 49 (-14.04%)
Mutual labels:  webgl, glsl
Gpu Gems Book Source Code
💿 CD Content ( Source Code ) Collection of Book <GPU Gems > 1~ 3 | 《GPU精粹》 1~ 3 随书CD(源代码)珍藏
Stars: ✭ 567 (+894.74%)
Mutual labels:  glsl, shader
Shadereditorextension
Google Chrome DevTools extension to live edit WebGL GLSL shaders
Stars: ✭ 539 (+845.61%)
Mutual labels:  webgl, glsl
Graphics Snippets
Shading techniques and GLSL snippets
Stars: ✭ 53 (-7.02%)
Mutual labels:  webgl, glsl
Shadersketches
KodeLife shader sketches I wrote while commuting
Stars: ✭ 536 (+840.35%)
Mutual labels:  glsl, shader
Regl Fire
Fire particle system made with regl
Stars: ✭ 16 (-71.93%)
Mutual labels:  webgl, glsl
Fieldplay
A vector field explorer
Stars: ✭ 922 (+1517.54%)
Mutual labels:  webgl, glsl
Awesome Glsl
🎇 Compilation of the best resources to learn programming OpenGL Shaders
Stars: ✭ 530 (+829.82%)
Mutual labels:  webgl, glsl
Bonzomatic
Live shader coding tool and Shader Showdown workhorse
Stars: ✭ 829 (+1354.39%)
Mutual labels:  glsl, shader
Wagner
Effects composer for three.js
Stars: ✭ 930 (+1531.58%)
Mutual labels:  webgl, glsl

glsl-grid

stable

Draws an antialiased grid along the X/Y/Z direction of a mesh. For use with glslify.

Reference from this gamedev post.

glsl-grid

Installation 📦

npm i glsl-grid -S

Usage 📖

grid(vec3 pos, vec3 axis, float size)

  • vec3 pos The position in world space.
  • vec3 axis The axis to draw a grid for. Set to 1.0 to enable, 0.0 to disable. i.e. vec3(0.0, 0.0, 1.0) will draw only along the z axis.
  • float size Space between grid tiles.

Example 💾

#pragma glslify: grid = require(glsl-grid)
varying vec3 vPos;

void main() {
    float lines = grid(vPos, vec3(0.0, 0.0, 1.0), 2.0);
    gl_FragColor = vec4(vec3(lines), 1.0);
}

Demo

License 📝

MIT. See LICENSE for details.

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