GLSL Hacker 0.8.4 Released for Windows, Linux, OS X and Raspberry Pi

A new update of GLSL Hacker is ready for your pixel hacking cravings. GLSL Hacker is a free cross-platform demotool (Windows, OS X, Linux and Raspberry Pi) for creating demos, games, interactive applications and creative coding. It is based on on Lua and Python programming languages as well as GLSL for OpenGL real time shaders.

1 – Overview

This new version brings important changes in some core modules especially the ones involved in rendering. Now all renderable objects in GLSL Hacker use the same render path and the same data structure. That means a triangular mesh, particles or the reference grid (lines) are the same thing for the renderer module. The rendering has been unified. One of the nice consequences is that tons of bugs have been fixed and even OpenGL 2 code with fixed pipeline works fine now.

GLSL Hacker 0.8.4 brings a new module, gh_av (available in Lua and Python), for video playback (audio+video) based on the FFmpeg plugin. So if you want to code simple video player with some post processing filters for Raspberry Pi for example, you have all the tools to do the job. It was an interesting but tough task to play with FFmpeg API and manage to synchronize audio and video streams. With but it’s done and it works quite well.

I added the audio support to the FFmpeg plugin simply because I was looking for a way to play sound on the Raspberry Pi. The Raspberry Pi (Raspbian) supports OpenMAX to play an audio buffer but has no real audio decoding support. So to decode audio files, FFmpeg was (and is still) the solution. Previous versions of GLSL Hacker had already the FFmpeg plugin to decode video files but without audio support. Now audio support has been added and you can use the new gh_av lib to play a audio-video media file. In a small game I’m working on, the FFmpeg plugin is used to play explosion sounds as well as background music on the Raspberry Pi.

2 – Downloads

You can download the latest GLSL Hacker for for Windows, OS X, Linux and Raspberry Pi from THIS PAGE. You can also download the Code Sample Pack from the same page.

The reference guide (scripting API), tutorials and useful links are available HERE.

Forums are available HERE (english) and HERE (french).

3 – Screenshots

Omni directional shadow mapping (Windows, Linux and OSX)

Geometry based spikes (Windows, Linux and OSX)

Particle painter test (Windows and Linux)

Webcam post processing effect (Windows)

Webcam post processing effect (Windows)

Sphere environment mapping on the Raspberry Pi

Particle test on the Raspberry Pi

FBX object loading (Windows and OSX)

Deferred rendering test

Bumpy sphere env mapping

Toonify post processing

Radial Blur Post Processing Filter

PhysX tests

4 – Changelog

Here is the version history since the latest annoucement of GLSL Hacker:

Version - 2015.05.05
! recoded from scratch vertex buffer related routines 
  in order to unify rendering of meshes, particles and lines.
! recoded the built-in OBJ loader. Works better and faster.

Version - 2015.04.29
+ added get_vertex_size() in gh_utils (lua/python).
+ added reset_vertex_attribs_name_and_loc() and 
  set_vertex_attrib_name_and_loc() to gh_gpu_program (lua).
! gh_mesh.set_user_vertex_attrib() and 
  gh_mesh.get_user_vertex_attrib() replaced by 
  gh_mesh.set_vertex_attrib_element() and 
- removed gh_mesh.copy_std_attrib_to_user_attrib() and 
* fixed a bug related to gh_mesh.set_vertex_alloc_params(). 
  The vertex alloc params was not re-initialized at scene init. 
* fixed a bug related to vertex attribute location when
  the same mesh is rendered with different GPU programs.
+ added assign_user_attrib_vertex_shader_index() to gh_mesh (lua).
+ added actor_set_kinematic_target_transform() to gh_physx3 lib (lua).
+ added get_shader_info_log() and get_info_log() to gh_gpu_program 
  lib (python / lua).
! updated FFmpeg plugin with latest SDK v2.6.2
! updated FreeImage plugin with latest SDK v3.17.0

Version - 2015.04.24
+ added joint_set_motor_params() to gh_physx3 lib (python / lua).

Version - 2015.04.21
+ added /rpi_disable_inputs command line option to the
  Raspberry Pi version to fully disable input management
  (keyboard and mouse).
! improved a bit global stability.
* fixed a bug in the GPU program live coding module on Windows platform.
* fixed gh_physx3.joint_distance_set_spring(). Now spring effect of
  distance joints works.
+ added gh_av lib to Python plugin.
+ added reset_streams() to gh_av.

Version - 2015.04.11
+ added run_simulation_step() and fetch_results() to gh_physx 
  lib (lua/python).

Version - 2015.04.03
+ added new audio/video lib based on FFmpeg: gh_av (Lua only for the moment).
+ added mouse capture support in the Windows version.

Version - 2015.03.27
+ added set_vertex_offsets() to gh_polyline lib (lua/python).
* fixed a bug in the Python version of gh_polyline.set_line_offsets().

Version - 2015.03.23
* fixed a minor bug in the Windows version related to script edition 
  during live-coding.
+ added update_alpha_channel_smooth() and update_alpha_channel_binary() to
  gh_texture lib.