Quick Links
  • Homepage
        - Overview
        - Download
        - Screenshots
        - Community
  • Code Sample Pack
  • Reference Guide
  • Changelog
  • Overview of GLSL Hacker
  • Live Coding
  • Hack your first GLSL Code
  • Moon3D

  • GLSL Hacker Articles

    > Compute shaders on Radeon
    > Distance functions in GLSL
    > GLSL Interpolation Qualifiers
    > Tessellation Spacing Modes
    > Normal Visualizer with GS
    > 3D Surface Plots
    > Normal Mapping
    > Circle and Disc in GLSL
    > PhysX 3 Flag Demo
    > GLSL Hacker on Raspberry Pi
    GLSL Hacker

    GLSL Hacker Changelog

    Version - 2014.10.17
    ! improved the FBX plugin (Windows and OS X) for loading Autodesk FBX files.
    ! updated the PhysX 3 plugin (Windows, Linux and OS X) with 
      latest PhysX SDK v3.3.2.
    + added a new OBJ loader (for testing purposes) and a way to change 
      current OBJ loader with gh_model.set_current_3d_obj_loader(name): 
      "ObjLoaderV1" or "ObjLoaderV2". Default is "ObjLoaderV1".
    Version - 2014.10.10
    ! updated pixel format support for image2D writing (GL_ARB_shader_image_load_store)
      PF_U8_RGBA (rgba8 in GLSL) and PF_U8_R (r8 in GLSL) added (gh_texture.image_bind()). 
      Version - 2014.10.10
    ! improved shader subroutines support with several uniform subroutines per GPU program.
    ! improved GPU programs speed (better management of uniform variables).
    Version - 2014.10.05
    + added webcam_get_num() to the gh_utils lib (Lua/Python).
    ! improved the management of multiple webcams in the Windows version.
    Version - 2014.10.04
    * bugfix: crash when ZOMBIE scripts are stored in separate file 
      instead of in the XML.
    + added network_message_pop() to gh_utils.
    Version - 2014.09.29
    ! updated network script updater (v0.2.0, Windows and OSX) with 
      live coding checkbox and execute button.
    ! fixed some bugs and improved the live coding in the Windows version.
    + added auto-save of scripts and shaders if necessary (read: they have been 
    + added a button in script and shader editors to save the code source in 
      the scripts/ or shaders/ folder of GLSL Hacker (Windows version only).
    * script and shaders errors are now correctly redirected to the output window.
    + added an option to disable live coding in script and shader editing windows 
      (Windows version only).
    * fixed some potential crashes in gh_utils functions that take strings as 
      parameters (like font_render() or font_render_3d().
    ! updated the dialog box / output window for the traces (Windows version only).
    + added circle_create(), circle_update_radius(), line_create(), 
      line_set_start_position(), line_set_end_position(), 
      line_set_start_color() and line_set_end_color() to gh_utils lib.
    ! updated the Lua immediate mode: now the Lua state of the first script 
      is used (not the case so far!). 
    * improved the GPU monitoring plugin when running on NVIDIA Optimus systems.
    + added gh_leap (Leap Motion) library in the Python plugin.
    + updated Python plugin: gh_renderer.get_capability_4i(), 
      gh_renderer.query_xxxx() (GL_ARB_pipeline_statistics_query GL4.5), gh_utils...
    Version - 2014.08.28
    + added a set of functions (gh_renderer.query_xxxx()) for 
      GL_ARB_pipeline_statistics_query (OpenGL 4.5).
    * GPU monitoring plugin: added GeForce GTX 745, GT 720, GTX 700M series, 
      GT 700M series, 800M series and GTX 800M series.
    * GPU monitoring plugin: updated with latest NVAPI R340.
    * bugfix: the menubar is no longer displayed in fullscreen mode 
     (Windows version).
    + added set_orientation_cubemap() to gh_camera lib.
    Version - 2014.08.05
    + added new plugin for Leap Motion device + new gh_leap library (Lua).
    + re-enabled log dialog box (Windows version) in Tools > Show log dialog box.
    + Lua print() redirected to log file.
    + added create_disc() to gh_mesh lib.
    + added gh_renderer.blending() and gh_renderer.blending_off() to quickly
      enable/disable color blending.
    + added new openGL queries to gh_renderer.get_capability_4i().
    ! improved robustness of the Lua version of gh_utils.trace().
    Version - 2014.06.21
    * fixed a bug with AntTweakBar plugin under Windows with 
      AMD Radeon cards that made the application to crash time 
      to time at the end of a scene.
    - removed all atomic_counter_xxxx() functions from gh_renderer.	
      They are replaced by the low level functions of 
      the gh_gpu_buffer lib. 
    * bugfix: the gh_camera.bind() function no longer update the 
      fixed pipeline if OpenGL core profile is used.
    + added OpenGL debug GL_ARB_debug_output support via 
      the gl_debug_profile="1" in the XML window node.
    + added memory_barrier() to gh_renderer lib.
    + added vertices_to_gpu_buffer(), vertices_from_gpu_buffer() 
      and set_vertex_source() to vertex_pool lib.
    - removed all shader_storage_buffer_xxxxx() functions from 
      vertex_pool lib.
    + added set_shader_storage_block_binding() to gh_gpu_program lib.
    + added set_automatic_uniform_state() to gh_object lib.
    * fixed a threading bug in the waitscreen + progress bar when 
      scene contains errors.
    + added gh_gpu_buffer, a new lib for managing GPU buffers in an 
      unified way.
    + added get_uniform_block_size(), get_uniform_block_index() 
      and set_uniform_block_binding() to gh_gpu_program lib.
    - removed all ub_xxx() functions from gh_gpu_program lib.
    Version - 2014.06.08
    + added support of transparent windows (alpha value) in OS X version.
    + added drag and drop support in the OS X version.
    ! OSX version: now GLSL Hacker stores the last position of the window
      and uses it for the next launch (useful with the drag and drop).
    + added FreeImage plugin support in the OS X version.
    + added a set of functions to manage custom dynamic 
      libraries: gh_utils.dylib_xxx(). Thanks to these functions, you can 
      use GLSL Hacker as a super window manager and code your own 3D 
      routines in the dynamic lib in C/C++.   
    Version - 2014.06.04
    ! updated the OpenGL context creation under Windows and Linux for when 
      the required major version is 2.
    + added create_ex_v3() to gh_render_target lib.
    + added uniform_camera_matrices() and uniform_object_matrix() 
      to gh_gpu_program lib.
    Version - 2014.05.28
    * fixed a bug in gh_mesh.set_vertices_color() in Lua.
    + added set_vertices_color() to gh_mesh in Python.
    + added mouse_get_wheel_delta() to gh_input lib.
    + added new keyboard keys support (shift, ctrl, alt and windows key).
    + added keyboard_codes.lua in GLSL Hacker Lua libs folder.
    + added FreeImage plugin with floating point (96 and 128-bit) support.
    + added set_current_image_codec_name() to gh_texture module.
    Version - 2014.05.19
    + added emitter_set_spawn_positions() to gh_ps module.
    + added back_face_culling() and front_face_culling() 
      to gh_renderer.
    + added box_create(), box_update_size() and sphere_create() 
      to gh_utils.
    + added update_bounding_volume(), get_bounding_box_size(), 
      get_bounding_sphere_center(), get_bounding_sphere_radius(), 
      get_global_bounding_box_size(), get_global_bounding_sphere_center(),
      get_global_bounding_sphere_radius() to gh_object.
    Version - 2014.05.15
    + added OpenGL 4.0 shader subroutines support 
    + added get_capability_4i() to gh_renderer.
    + added create_pqtorus() to gh_mesh.
    + added actor_add_force(), actor_add_force_at_position() and 
      actor_set_kinematic_target() to gh_physx3 lib (lua/python).
    * fixed a bug in AntTweakBar functions when the AntTweakBar plugin 
      is not loaded.
    + added set_simulation_scales() to gh_physx3 lib (lua/python).
    Version - 2014.05.08
    + the PhysX plugin is now available for the Linux version.
    * fixed a minor bug in the cloth module of PhysX3 plugin.
    Version - 2014.05.06
    * fixed GLSL live coding bug for OpenGL 3+ shaders.
    * fixed a bug in gh_physx3.apply_actor_transform(). Only the 
      transformation matrix was updated.   Now position and orientation 
      of the object are properly updated as well.
    - added grid_xxxxxxx() functions to gh_utils to manage reference 
      grids (lua/python).
    - PhysX 3 plugin updated with latest PhysX SDK v3.3.1
    Version - 2014.04.23
    - added create_persp_v2() and create_persp_v3() to gh_camera (lua/python).
    - added open_url() to gh_utils (lua/python).
    - fixed a bug in gh_object.get_absolute_position().
    - added get_distance() to gh_object lib to get the distance between 
      two objects (lua/python).
    - added delay_before_swap_nv() to gh_renderer lib for Windows and 
      Linux versions
    - updated gh_audio.sound_create() with streaming option.
    - minor changes in existing plugins
    - added math_length_vec3() to gh_utils (lua/python).
    Version - 2014.04.01
    - added create_from_file_v3() to gh_texture lib (lua/python) for the 
      support of compressed textures.
    - added get_gpu_memory_size() to gh_texture lib (lua/python).
    - added inject_opacity_map() to gh_texture lib (lua/python).
    - added create_plane_v3() to gh_mesh lib (lua/python) to create a mesh 
      plane with an initial orientation applied to vertices.
    - bugfix: workaround added in gh_render_target.resolve_multisampling() for
      Radeon GPUs under Mac OSX (the depth buffer is no longer processed).
    Version - 2014.03.17
    - added set_orientation_v2() to gh_object lib to set the orientation 
      of an object from two direction vectors.
    - added FMOD-based audio plugin with new host-api lib: gh_audio (lua/python).
    Version - 2014.03.06
    - added support of shared variables between scripts in different 
      threads or in different languages (Lua - Python).
    - updated and improved management of Lua states in multithreaded 
      env (ZOMBIE scripts, multiple 3D windows).
    - added "resizable" attribute in xml scene node.
    - improved scripting error detection. The demo is stopped at the 
      first error detected. 
    - added new functions to gh_model lib to load 3D objects with vertex 
      alloc params.
    - updated GPU detection code in GPU monitoring for Mac OS X.
    - updated GPU monitoring plugin with temperature graph when GPU temperature 
      reading is available.
    - added mouse_show_cursor() to gh_input lib (works with Windows only).
    Version - 2014.02.13
    - bugfix: in font bitmap rendering with OpenGL 2 
      (built-in vertex attribs vs generic vertex attribs).
      This bug was only visible under OS X with a NVIDIA GPU.
    Version - 2014.02.04
    - bugfix: in 2D font bitmap rendering with OpenGL 2.
    Version - 2014.01.28
    - bugfix: crash in gh_renderer.set_scissor() Lua version.
    Version - 2014.01.27
    - bugfix: Lua live coding fixed.
    Version - 2014.01.24
    - added multiple render targets suppport.
    Version - 2014.01.24
    - added OpenGL 4.4 bindless texture support and uniform buffer object 
      for passing array of bindless textures to a shader stage.
    - added new functions for passing GLSL uniforms (uniform_1ui64v(), uniform_1ui64(), 
      uniform_1/2/3/4d...) to gh_gpu_program (Lua).
    - added platform information in the benchmark scores file.
    - Linux: fixed segmentation fault when the demo initialization fails. 
    - Linux: the console output (with /console_output command line option) is fixed. 
    - added support of user vertex attribs: alloc_user_vertex_attribs(), 
      set_user_vertex_attrib() and get_user_vertex_attrib() added to gh_mesh lib.
    - added new GPU monitor plugin and associated host API function: gh_gpumon (Lua).
      The gh_gml lua/python module is now based on this GPU monitor plugin.
    - added quad wireframe rendering option for some built-in meshes 
      (plane, sphere, torus, cylinder).
    - plugin management improved.
    - updated with gxl3d 0.8.x branch.
    Version - 2014.01.11
    - moved all video player functions based on FFmpeg to a separate plugin
    Version - 2013.12.24
    - added write_to_file_v2() to gh_texture lib.
    - added flip_vertical() to  to gh_texture lib.
    Version - 2013.12.18
    - added set_instance_color() and set_instance_scale() to gh_mesh.
    Version - 2013.12.10
    - updated tinyxml2 in gxl library.
    - fixed bugs in cross-platform compilation for ffmpeg and 
      anttweakbar support.
    Version - 2013.12.06
    - added uniform1fv(), uniform2fv(), uniform3fv() and uniform4fv()
      to gh_gpu_program (Lua).
    - added video support in gh_texture lib (gh_texture.video_xxxxx() 
      functions). Video support is based on ffmpeg.
    Version - 2013.11.30
    - added get_version() to gh_utils lib.
    - added anttweakbar support (Windows version only) with a set of 
      functions (twbar_xxx) in gh_utils lib.
    Version - 2013.11.20
    - added webcam support for Windows version with a set of 
      functions (webcam_xxx) in gh_utils lib.
    Version - 2013.11.15
    - added raycast_get_ray() and raycast_cast_ray() to gh_utils lib.
    Version - 2013.11.08
    - fixed a minor bug related to texture pixmap 
      update (gh_texture.set_texel_2d).
    Version - 2013.11.06
    - Internal changes in source code. 
    Version - 2013.11.05
    - added set_virtual_screen() and update_virtual_screen() 
      to gh_renderer lib for OS X version.
    Version - 2013.11.04
    - added get_virtual_screen() and get_num_virtual_screens() 
      to gh_renderer lib for OS X version.
    - minor changes in the loading of init0.xml and conf.xml
    - Internal update: latest tinyxml2 1.0.12
    Version - 2013.10.27
    - updated Python plugin with missing functions in gh_object lib: 
      scale_vertices_position(), flip_faces(), flip_vertex_normals().
    - added set_vertices_color() to gh_object lib (Python / Lua).
    - fixed a bug in the FBX loader (vertices color).
    Version - 2013.10.31
    - fixed a bug in the OS X version when an OpenGL 4.0 context 
      was required.
    Version - 2013.10.25
    - added a libs/ folder into GLSL Hacker root directory with 
      Lua and Python high level librairies used by demos.
    - added OS X 10.9 Mavericks support.
    - updated version number, four numbers are now used: 
    - added keyboard support for Linux.
    - added get_platform_name() to gh_utils lib.
    - added set_orientation() and get_orientation() to gh_object lib.
    - added set_vertices_color() to gh_mesh lib.
    - fixed a bug with bitmap fonts and OpenGL 2 context.
    - Windows and OS X version: added keyboard shortcuts for loading a 
      scene (Ctrl+O), reloading a scene (Ctrl+R) and for displaying 
      the log file (Ctrl+L).
    - the position of the main 3d window is stored in the conf.xml 
      file and is used for the next launch.
    - added get_host_app_dir(), get_scripting_libs_dir() and 
      get_command_line() to gh_utils lib. 
    - improved the error handling (traces, exit at 
      first syntax/runtime error).
    - fixed bugs in the loading of scripts and gpu programs from 
      files (xml). Now the filename attribute of gpu_program and 
      scripts xml modes works correctly.
    - added a configuration file (conf.xml).
    - Windows version: GLSL Hacker plugins are now stored in the 
      plugins/ folder.
    - updated arguments of gh_utils.font_bm_create() function.
    - added get_physx_version() to gh_physx3 lib.
    - added set_render_state() and get_render_state() to gh_node lib.
    - added tripod_visualizer_object_render() and 
      tripod_visualizer_camera_render() to gh_utils lib 
      (for GL2 and GL3+).
    - removed tripod_visualizer_render() from gh_utils lib. 
    - added create_cylinder() and create_ellipse() to gh_mesh lib.
    - added new command line param: /noload_plugin_physx3
    - added new command line param: /noload_plugin_fbx
    - updated gh_utils.font_bm_update() with a new parameter: mapped_gpu_memory.
    - added Autodesk FBX support (via a plugin) with 
      create_from_file_loader_fbx() to gh_model lib.
    - added flip_vertex_normals() to gh_object lib.
    - added OpenGL 4.2 atomic counters support: atomic_counter_create_buffer(), 
      atomic_counter_kill_buffer(), atomic_counter_buffer_bind(), 
      atomic_counter_set_value() and atomic_counter_get_value() added 
      to gh_renderer lib.
    - added particle system lib (gh_ps) to Lua/Python API.
    - fixed a bug in gh_utils.tripod_visualizer_render() with OpenGL 2 context.
    - added create_terrain() to gh_mesh lib.
    - added scale_vertices_position() to gh_object lib (for mesh).
    - added set_depth_buffer_writing_state() to gh_renderer.
    - added set_vertex_position_w() to gh_mesh lib. Useful with PhysX clothes.
    - added set_pitch(), set_yaw() and set_roll() to gh_camera lib.
    - added get_position(), get_view_vector() and get_up_vector() 
      to gh_camera lib.
    - added w param in gh_camera.set_lookat().
    - added support of PhysX 3.3 SDK (via a plugin) in Lua and Python: 
      gh_physx3 lib.
    - bugfix in OBJ object loader.
    Version 0.5.0 - 2013.05.09
    - fixed bugs in resource freeing (material/textures).
    - added tripod_visualizer_render() to gh_utils. This tripod can 
      be displayed in GL2 and GL3+ core profile.
    - added support of shader storage buffer for compute shaders 
      in gh_vertex_pool.
    - added new command line param: /noload_plugin_opencl 
    - added new command line param: /noload_plugin_python27 
    - added new command line param: /disable_opengl_support_check 
    - fixed a memory leak in texture destruction.
    - added get_platform() to gh_utils lib.
    - added uniform2i(), uniform3i() and uniform4i() to gh_gpu_program.
    - added uniform4i_array() and uniform4f_array() to gh_gpu_program.
    - added Python 2.7.3 plugin for scripting.
    - updated lua engine to Lua 5.2.2
    - added set_texel_1d(), set_texel_2d() to gh_texture lib.
    - added renderer_update() to gh_texture lib.
    - added cubemap support with gh_texture.create_cube_from_file() function.
    - added gh_texture.create_1d()
    - renamed gh_texture.create() in gh_texture.create_2d()
    - added get_gpu_memory_usage_kb_amd() to gh_renderer lib.
    - Added TERMINATE scripts.
    - Buffer object usages can be forced either by scripting or 
      by command line.
    - Added force_buffer_object_usage() to gh_renderer lib.
    - Added timer_reset() and timer_get_milliseconds() to gh_window lib.
    - Added update_built_in_uniforms() to gh_object lib.
    - Added font_bm_create(), font_bm_get_charset_texture(), font_bm_draw_text_2d(),
      font_bm_draw_reset() and font_bm_render() to gh_utils.
    - Added new functions into gh_utils to manage a simple spline: spline_create(),
      spline_add_keyframe(), spline_get_value().
    - Added create_rb(), clear_color_buffer() and clear_depth_buffer() 
      to gh_render_target.
    - Added rasterizer_set_msaa_state() to gh_renderer.
    - Added do_linear_tweening() to gh_mesh lib.
    - Added alloc_mesh_data(), set_face_indexes() and get_face_indexes() 
      to gh_mesh.
    - Added set_gpu_program(), get_gpu_program(), add_texture() and 
      remove_texture() to gh_material lib.
    - Added get_num_materials(), get_material(), add_material(), 
      remove_material() and remove_all_materials() to gh_object.
    - Added set_materials_texture_unit_offset() to gh_object.
    - Added compute_faces_normal() and compute_vertices_normal() to gh_object.
    - Added set_sampler_params() to gh_texture lib.
    - Added gl_core_profile and sw_renderer attributes to window xml node.
    - Added set_vertex_position(), set_vertex_color(), get_vertex_color(), 
      set_vertex_normal(), get_vertex_normal(), set_vertex_tangent(), 
      get_vertex_tangent(), set_vertex_uv() and get_vertex_uv() to gh_mesh lib.
    - Added set_vertex_attrib_name() and get_vertex_attrib_name() 
      to gh_gpu_program lib.
    - Added update_vertex_attrib_location() to gh_object lib.
    - Removed update_vertex_attrib_location() from gh_mesh lib.
    - Added create_depth() and create_depth_rect() to gh_render_target lib.
    - Added get_num_gpus_amd() and get_gpu_memory_total_available_kb_amd() 
      to gh_renderer lib.
    - Added get_gpu_memory_total_available_kb_nv(), 
      get_gpu_memory_current_available_kb_nv() and get_gpu_memory_usage_kb_nv()
      to gh_renderer lib.
    - Added gh_opencl lib. This first version allows to retrieve OpenCL information 
      about platforms and devices. 
    - Added gh_gml lib. gh_gml is the scripting wrapper around GML (GPU Monitoring Lib).
      GML is currently available on Windows only and is limited to NVIDIA GPUs. AMD GPUs
      will be supported shortly.
    - Added map_vb(), unmap_vb(), vb_set_vertex_position(), vb_set_vertex_position_ptr(),
      vb_set_vertex_color() and vb_set_vertex_color_ptr() to gh_vertex_pool lib.
    - Added create_box() to gh_mesh lib.
    - Added set_instance_axis_angle() to gh_mesh lib.
    - Added polyline support: gh_polyline lib.
    - Added resize() to gh_render_target lib.
    - Added use_with_syphon() to gh_render_target lib to use a render 
      target with Syphon.
    - Added Syphon support to the OSX version.
    MAD Hacker
    - Added luamidi lib.
    - Added use_with_syphon() to gh_render_target lib to use a render 
      target with Syphon.
    - Added Syphon support to the OSX version.
    Version 0.4.0 - 2013.01.18
    - First public release.
    - Many changes compared to v0.3.2 (for example ID is no longer used 
      in Lua and Python scripting).
    Version 0.3.2 - 2012.10.18
    - Fixed a 32/64-bit bug in GXL3D module. 
    Version 0.3.1 - 2012.09.24
    - Added:  /x_window_name command lien param (for X11-based apps only).
    - Fixed a bug in scripting live coding. 
    Version 0.3.0 - 2012.09.10
    - Minor changes in the gxl engine for the Python plugin
    - Plugin Python 2.7 32/64-bit added.
    Version 0.2.2 - 2012.09.06
    - Added: get_vertex_position(), get_vertex_position_ptr(), 
      get_vertex_absolute_position() and get_vertex_absolute_position_ptr()
      to gh_mesh lib.
    - Added: get_num_vertices(), get_num_vertices_ptr(), get_num_faces() and
      get_num_faces_ptr() to gh_object lib.
    - Added: get_absolute_position() and get_absolute_position_ptr() to 
      gh_object lib.
    - Added: font_render3d() and font_render3d_ptr() to gh_utils lib.
    - Added: set_grid_params(), set_grid_params_ptr(), display_grid(), 
      display_grid_ptr(), set_display_grid_state() and 
      set_display_grid_state_ptr() to gh_object lib.
    - Added: set_tripod_size() and set_tripod_size_ptr() to gh_object lib.
    Version 0.2.1 - 2012.09.04
    - Change: if erros are detected in an INIT script, all scripts are disabled
      and a red screen is displayed.
    - Added: command line parameter /boxes_transparency= to set the 
      transparency of live coding boxes.
    - Change: live coding boxes transparency set to 255 by default (fully opaque).
    - Change: description of live coding boxes transparency in managers 
      (scripts and gpu programs).
    - Bugfix: Lists of GPU programs and scripts in managers are automatically 
      refreshed when a new scene is loaded. 
    Version 0.2.0 - 2012.09.01
    - First version of the reference manual.
    - Added drag n drop support: script DRAG_N_DROP + functions 
      and gh_utils.drop_files_get_file_by_index().
    Version 0.1.0 - 2012.08.29
    . Very first alpha release, internal use only.

    (C)2012-2014 Geeks3D