GithubHelp home page GithubHelp logo

lygia_examples's Introduction

This are GLSL examples of how to use LYGIA Shader Library. You can try them using:

How to start?

Clone this repository recursivelly

git clone --recursive https://github.com/patriciogonzalezvivo/lygia_examples.git

ANIMATION

Easing

glslViewer animation_easing.frag -l

COLOR

LookUp table

glslViewer color_lut.frag assets/danny.png assets/square_01.png -l

Dither

glslViewer color_dither.frag -l

Mix vs mixOklab vs MixBox color mixing

glslViewer color_mix.frag lygia/assets/mixbox_lut.png -l

Iridescence map

	glslViewer color_iridescence_map.frag -l

Spectral Wavelength to RGB

	glslViewer color_wavelenght.frag -l

DRAW

Digits

glslViewer draw_digits.frag -l

GENERATIVE

Random

glslViewer generative_random.frag 

Clasic Noise

glslViewer generative_cnoise.frag 

Perlin Noise

glslViewer generative_pnoise.frag 

Simplex Noise

glslViewer generative_snoise.frag 

Tiling Simplex Flow Noise

glslViewer generative_psrdnoise.frag assets/sphere.ply -l

Simplex Noise Derivatives

glslViewer generative_noised.frag 

Curl Noise

glslViewer generative_curl.frag 

Fractal Brownian Motion

glslViewer generative_fbm.frag 

Voronoi

glslViewer generative_voronoi.frag 

Voronoise

glslViewer generative_voronoise.frag 

Worley Noise

glslViewer generative_worley.frag 

SAMPLE

Wrap clamp2edge vs repeat

	glslViewer sample_wrap.frag assets/rocks.png -l

Wrap repeat vs mirror

	glslViewer sample_wrap_mirror.frag assets/rocks.png -l

Wrap repeat vs untile

	glslViewer sample_wrap_untile.frag assets/rocks.png -l

Bracketing

	glslViewer sample_bracketing.frag assets/rock_moss.jpg -l

Bicubic filter

	glslViewer sample_filter_bicubic.frag assets/noise_blue.png -w 1080 -h 1080 --headless -E screenshot,

Nearest filter

	glslViewer sample_filter_nearest.frag assets/noise_blue.png -w 1080 -h 1080 --headless -E screenshot,

Smooth filter

	glslViewer sample_filter_smooth.frag assets/noise_blue.png -w 1080 -h 1080 --headless -E screenshot,

Sample DoF

	glslViewer sample_dof.frag assets/dragon.obj -C assets/Arches_E_PineTree_3k.hdr -e camera_position,-1.43923,0.891203,1.98093 -l 

FILTER

boxBlur 1D

	glslViewer filter_boxBlur1D.frag assets/danny.png -e buffers,on -l

boxBlur 2D

filter_boxBlur2D:
	glslViewer filter_boxBlur2D.frag assets/danny.png -l

GaussianBlur 1D

	glslViewer filter_gaussianBlur1D.frag assets/danny.png -e buffers,on -l

GaussianBlur 2D

	glslViewer filter_gaussianBlur2D.frag assets/danny.png -l

BilateralBlur 2D

	glslViewer filter_bilateralBlur2D.frag assets/danny.png -l

RadialBlur 2D

	glslViewer filter_radialBlur2D.frag assets/danny.png -l

NoiseBlur 2D

	glslViewer filter_noiseBlur2D.frag assets/danny.png -l

Median 2D

	glslViewer filter_median2D.frag assets/danny.png -l

Kuwahara 2D

	glslViewer filter_kuwahara2D.frag assets/danny.png -l

Sharpen 2D

	glslViewer filter_sharpen2D.frag assets/danny.png -l

Laplacian 2D

	glslViewer filter_laplacian2D.frag assets/danny.png -l

Edge 2D

	glslViewer filter_edge2D.frag assets/danny.png -l

MORPHOLOGICAL

EROSION

	glslViewer morphological_erosion.frag assets/flower.png -l

DILATION

	glslViewer morphological_dilation.frag assets/flower.png -l

ALPHA FILL

	glslViewer morphological_alphaFill.frag assets/flower.png -l

LIGHTING

View Position (pass)

glslViewer assets/dragon.obj lighting_position.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

View Normal (pass)

glslViewer assets/dragon.obj lighting_normal.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

Shadow (material)

glslViewer assets/dragon.obj lighting_shadow.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

ScreenSpace Ambient Occlusion (postprocessing)

glslViewer assets/dragon.obj lighting_ssao.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

Gooch (material)

glslViewer assets/dragon.obj lighting_gooch.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

SphereMap (material)

glslViewer assets/dragon.obj lighting_sphereMap.frag assets/matcap.jpg -e camera_position,-1.43923,0.891203,1.98093

Spherical Harmonics (material)

glslViewer assets/dragon.obj lighting_sphericalHarmonics.frag -e camera_position,1.43923,-0.891203,-1.98093 -c assets/uffizi_cross.hdr -l

PBR (material)

glslViewer assets/dragon.obj lighting_pvr.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

PBR with cubemap (material)

glslViewer assets/dragon.obj lighting_pbr.frag -e camera_position,1.43923,-0.891203,-1.98093 -C assets/uffizi_cross.hdr -e dynamic_shadows,on -l 

PBR ClearCoat (material)

glslViewer assets/dragon.obj lighting_pbrClearCoat.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

PBR ClearCoat with cubemap (material)

glslViewer assets/dragon.obj lighting_pbrClearCoat.frag -e camera_position,1.43923,-0.891203,-1.98093 -C assets/uffizi_cross.hdr -e dynamic_shadows,on -l 

PBR Glass (material)

glslViewer assets/dragon.obj lighting_pbrGlass.frag -e camera_position,1.43923,-0.891203,-1.98093 -l

PBR Glass with cubemap (material)

glslViewer assets/dragon.obj lighting_pbrGlass.frag -e camera_position,1.43923,-0.891203,-1.98093 -C assets/uffizi_cross.hdr -e dynamic_shadows,on -l 

ScreenSpace Reflections (postprocessing/raymarching)

glslViewer assets/dragon.obj lighting_ssr.frag -e camera_position,1.43923,-0.891203,-1.98093 -C assets/uffizi_cross.hdr -l 

Volumetric Light Scattering (postprocessing/raymarching)

glslViewer assets/dragon.obj lighting_volumetric.frag -e camera_position,-1.67433,0.0682091,-1.99539 -l 

Volumetric Light Scattering with Cubemap(postprocessing/raymarching)

glslViewer assets/dragon.obj lighting_volumetric.frag -e camera_position,-1.67433,0.0682091,-1.99539 -C assets/Arches_E_PineTree_3k.hdr -l 

Raymarching

glslViewer lighting_raymarching.frag -e camera_position,-29.5393,-26.2406,-42.1865 -l

Raymarching custom PBR

glslViewer lighting_raymarching_pbr.frag -e camera_position,-29.5393,-26.2406,-42.1865 -l

Raymarching custom PBR with CUBEMAP

glslViewer lighting_raymarching_pbr.frag -e camera_position,-29.5393,-26.2406,-42.1865 -C assets/uffizi_cross.hdr -l

Raymarching custom GLASS material

glslViewer lighting_raymarching_glass.frag -e camera_position,-29.5393,-26.2406,-42.1865 -l

Raymarching custom GLASS material with CUBEMAP

glslViewer lighting_raymarching_glass.frag -e camera_position,-29.5393,-26.2406,-42.1865 -C assets/uffizi_cross.hdr -l

Raymarching default VOLUME

glslViewer lighting_raymarching_volume.frag -e camera_position,-29.5393,-26.2406,-42.1865 -l

Atmosphere Scatering

glslViewer lighting_atmosphere.frag -l -w 1024 -h 512 -e define,PROJECTION_MODE,0

glslViewer lighting_atmosphere.frag -l -e define,PROJECTION_MODE,1

lygia_examples's People

Contributors

patriciogonzalezvivo avatar snibbe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.