• 16 / 06 / 2014
  • Comments : 1
Play with Shader GLSL !

You can add Shader GLSL files (.frag) in Bazik, create your own and share them with the community.

What is Shader ?

A shader is a computer program that is used to do shading: the production of appropriate levels of color within an image, or, in the modern era, also to produce special effects or do video post-processing. It’s a program that teaches a computer how to draw something in a specific and unique way. It is really powerful and easy to edit.

Where find Shader GLSL files ?

You can find “Bazik ready” Shader files in our blog :

You can find Shader GLSL easy on the web but this files are not create specially for Bazik. That’s why it’s better to create your own composition. Shader is really powerfull but it’s a hard language for beginner.

A good way to start :

How to add a Shader file ?

Simply drag and drop them in the Presets panel. Bazik transform instantly your Shader file (.frag) in a preset.

Capture d’écran 2014-06-16 à 12.28.40

If a file already exist with the same name, this file would be updated.

When it is done, you can use the Snapshot button to update the new preset look. Snapshot gets output render to create a thumbnail.



How to delete a Shader file ?

To delete a content, you need to go inside the app.
Be careful before delete something and don’t erase a good file !

Make right click on Bazik app, Show Package Contents.

Show content

Go to the Presets folder. Find your file and delete them.


How to create Shader file for Bazik with full control ?

You need to create a unique frag (.frag) file. Bazik is ready to send several controls to shader GLSL. Here is the list of inputs you can use in your shader file :

uniform float time; // bazik preset playback time in seconds
uniform vec2 resolution; // bazik render width (x) & height (y)

uniform vec3 color1; // bazik user color 1 (r=x, g=y, b=z)
uniform vec3 color2; // bazik user color 2 (r=x, g=y, b=z)
uniform vec3 color3; // bazik user color 3 (r=x, g=y, b=z)
uniform vec3 color4; // bazik user color 4 (r=x, g=y, b=z)

uniform float eq1; // bazik 3 band equalizer bass value 0.0 to 1.0
uniform float eq2; // bazik 3 band equalizer medium value 0.0 to 1.0
uniform float eq3; // bazik 3 band equalizer high value 0.0 to 1.0
uniform float banger; // bazik music banger (beat detect) 0.0 to 1.0

uniform int breaker; // bazik user control 0 or 1
uniform int mode; // bazik user control 1,2,3,4,5,6,7 or 8
uniform float shift; // bazik user shift random value 0.0 to 1.0

uniform float par1; // bazik user control -1.0 to 1.0
uniform float par2; // bazik user control -1.0 to 1.0

You can find a sample here : shader-crazy-pixel

Send us your creation and we would be happy to share them with community !
Related Posts