• This repository has been archived on 01/Dec/2020
  • Stars
    star
    167
  • Rank 226,635 (Top 5 %)
  • Language GLSL
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Live Code Graphics via GLSL Fragment Shaders

Fragment

About:

Fragment is an open source design tool that utilizes GLSL and live coding to allow anyone to create spectacular imagery with math(s)!

Similar to shadertoy.com, glslsandbox.com, and glslb.in. Fragment is a constrained design tool for content creation within the boundaries of two triangles. If none of that made any sense, please visit www.shadertoy.com

Unlike shadertoy, Fragment is a native macOS app, that allows you to edit your GLSL code with which ever text editor you prefer. Fragment allows you to render out high resolution prints, and png sequences (with transparency if you want it)! Also, you can VJ with Fragment by sending it OSC :)

Fragment allows you to create playable real-time visual instruments. It does this by creating UI elements (sliders, buttons, etc) from comments in your glsl code, i.e. uniform float foobar; //slider:0.0,1.0,0.5.

More info here: www.syedrezaali.com/store/fragment-osx-app.

Examples:

Check out some things made with Fragment: https://github.com/rezaali/FragmentSketches

Build Fragment:

1. Clone Cinder

git clone --recursive https://github.com/cinder/Cinder.git Cinder

2. Clone Fragment:

cd Cinder/samples
mkdir _reza
cd _reza
git clone [email protected]:rezaali/Fragment.git

3. Clone Dependencies

cd ../../blocks/
git clone [email protected]:rezaali/Cinder-SaveLoadCamera.git SaveLoadCamera
git clone [email protected]:rezaali/Cinder-EasyCamera.git EasyCamera
git clone [email protected]:rezaali/Cinder-MovieSaver.git MovieSaver
git clone [email protected]:rezaali/Cinder-SequenceSaver.git SequenceSaver
git clone [email protected]:rezaali/Cinder-LiveCode.git LiveCode
git clone [email protected]:rezaali/Cinder-ImageSaver.git ImageSaver
git clone [email protected]:rezaali/Cinder-GlslParams.git GlslParams
git clone [email protected]:rezaali/Cinder-UI.git UI
git clone [email protected]:rezaali/Cinder-Tiler.git Tiler
git clone [email protected]:rezaali/Cinder-AppUI.git AppUI
git clone [email protected]:rezaali/Cinder-AppPaths.git AppPaths
git clone [email protected]:rezaali/Watchdog.git Watchdog

4. Build Cinder

cd ../../proj/xcode/ && ./fullbuild.sh

5. Open Fragment Xcode project

cd ../samples/_reza/Fragment/xcode
open Fragment.xcodeproj/

6. Run

In Xcode, go to the Product Menu and then Run or press Apple + R

Using Fragment:

  1. Arrange Windows (Apple + w)
  2. Set your code editor (Click SET EDITOR button) & navigate to your favorite text editor app
  3. Open the editor (Click OPEN EDITOR button or Apple + Shift + E). This will open the folder containing the code you should edit (shader.frag)
  4. Edit the code and save, Fragment will recompile the shaders and show you hottness.
  5. Save your live code session by clicking SAVE AS.
  6. Load a live code session by clicking LOAD.
  7. Try rendering a high res print (EXPORTER > SAVE IMAGE AS)
  8. Try rendering a movie (EXPORTER > RENDER): Select MOVIE Option, unselect PNG and click RENDER
  9. Change the total number of frames for your movie (this effects the iAnimationTime, which goes from 0 -> 1). The number dialer for this is next to EXPORTER > PNG.
  10. Try rendering a sequence of pngs (EXPORTER > RENDER) Select PNG Option, unselect MOVIE and click RENDER.

Improving Fragment:

  1. Make this readme better and submit a pull request!
  2. Point out things I'm doing wrong or could be better.
  3. Submit an example.
  4. Refactor something to make it easier to understand.
  5. Share Fragment with your friends.

More Repositories

1

ofxUI

[DEPRECATED] UI Addon for openFrameworks
C++
519
star
2

FragmentSketches

Example Sketches for Fragment: http://www.syedrezaali.com/store/fragment-win-app
GLSL
71
star
3

webgl-sketches

Computational Design Sketches & Examples for YCAM Coder JS Workshop
JavaScript
69
star
4

ofxGenerative

[DEPRECATED] An addon for openframeworks that helps to create generative systems or dynamical real-time simulations
C++
51
star
5

Cinder-UI

UI is a minimal & fast library that helps create Debug User Interface Controls
C++
26
star
6

Transform

Live Code GPU Particle Systems via Transform Feedback (GLSL)
GLSL
20
star
7

ofxMesh

[DEPRECATED] Mesh Data Structures for Generative Systems
C++
15
star
8

webgl-tutorial

Tutorial for Tool & Algorithms for Computational Design (YCAM GRP)
JavaScript
14
star
9

Cinder-ParticleSystem

This blocks helps to create GPU based particle systems and renderers
C++
11
star
10

Cinder-Dither

Dithering Algorithms
C++
8
star
11

Lormalized

Lormalized Processing Source Code (2008)
Processing
7
star
12

webgl-base

base webgl sketching template for prototyping
JavaScript
6
star
13

Cinder-OpenVDB

OpenVDB (openvdb.org) Block for Cinder (libcinder.org)
C++
6
star
14

Cinder-Syphon

Syphon Implementation for Cinder 0.9.0+
Objective-C
6
star
15

Cinder-Tiler

Tiler helps render out high resolution images
C++
5
star
16

Cinder-Voro

A 3D Voronoi Cell Library in C++ (Voro++ by Chris H. Rycroft, Blockified by Reza Ali)
C++
4
star
17

Cinder-GlslParams

Helps retrieve GLSL uniforms (exposed through comments) for UI binding.
C++
3
star
18

Cinder-SaveLoadCamera

This block helps save and load a camera from json
C++
2
star
19

Cinder-EasyCamera

This block helps to create a CameraUI and reduce boilerplate code
C++
2
star
20

Cinder-AppPaths

Cinder block that allows you to easily access application assets in a scale-able way
C++
2
star
21

Cinder-LiveCode

This block uses watchdog to watch glsl files and aids in live coding and real-time ui creation
C++
2
star
22

Cinder-SaveLoadWindow

This block helps in saving and loading window properties with json
C++
1
star
23

Cinder-MovieSaver

This block helps save movies (using quicktime)
C++
1
star
24

Cinder-PoissonDiskDistribution

Poisson Disk Distribution block for Cinder 0.9.0+ by simongeilfus (blockified by rezaali)
C++
1
star
25

Cinder-AppUI

This block manages UIs created with Cinder-UI to help reduce boilerplate code
C++
1
star
26

Cinder-Triangulation

Triangluation block for Cinder 0.9.0+ by simongeilfus (blockified by rezaali)
C++
1
star