sales@scenomics.com +1 650 396 9674


Release details are described below:

Change Log

Added a feature that allows you to right click on a 2D or 2D array texture and automatically create a shader graphlet for visualizing the selected <Texture>. Values in the target <Texture> are converted to normalized floating point (0.0 to 1.0) and rendered out to the screeen.

This makes it much easier to create debug shaders that show you the results of a compute shader pass on screen. This command works best with visual data, but it also works on non-visual data and can be very useful in that regard. This feature requires GLSL 430 or higher, but it can be adapted to support 400 or higher with minor changes.

Here's an example of a compute shader that uses one of the new visualizers to show the results of a prefix sum computation.


   #include <SPA_Version.glsl>
   #include <SPA_Normalize.glsl>
   #include "visualizer_attributes.glsl"

   buffer tex_min_max
   {
      float min_max_values[ 32 ];
   };

   uniform int array_index;

   layout( rgba8 ) uniform image2DArray src;

   in Data { vertexData attributes; } DataIn;
   out vec4 fragColor;

   void main(void)
   {
      ivec3 src_dims = imageSize( src );
      ivec3 coords = ivec3( DataIn.attributes.texcoord * vec2( src_dims.xy ), array_index );
      vec4 pix = imageLoad( src, coords );

      int array_base = array_index * 2;
      float min_value = min_max_values[ array_base ];
      float max_value = min_max_values[ array_base + 1 ];
      vec4 result = SPA_Normalize( pix, min_value, max_value, 0.0, 1.0 ); // Converts range to 0.0 to 1.0.
      fragColor = result;
   }
                           
You can find the code for this feature in APP_SERVICE_VISUAL_SHADER_WIZARD.SSL.
Added <GlslCodeHelper>, a static data interface class that generates sampling code for 2D and 2D array <Texture> nodes. Sampling code is usually just several lines of code, but it's surprisingly tricky to get right (especially if you're in a hurry to debug something). It's better to automate it. Here's the sampling code generated for a 2D array texture.

   ivec3 src_dims = imageSize( src );
   ivec3 coords = ivec3( DataIn.attributes.texcoord * vec2( src_dims.xy ), array_index );
   vec4 pix = imageLoad( src, coords );