Shaders

The preview

See a shader run, at the size you choose.

The preview sits at the top right. Its toolbar:

ControlDoes
Pause / PlayStops or resumes the shader.
ResolutionThe size it is drawn at, from QVGA 320 × 240 to 4K 3840 × 2160, or a size you add.
AlphaShows a checkerboard behind the picture, to see transparency. Off, the alpha is left out: a shader that never writes it (most from Shadertoy) still shows.
fps and msFrames per second (blue) and GPU time per frame (orange).
Fit, move, zoomRecenter the picture, drag it, zoom it.

The default is VGA 640 × 480, chosen for speed.

The resolution is remembered for each document, and your own sizes are the same in every library: they are a setting of the app.

The Alpha toggle is also remembered for each shader or pipeline in its folder, including after reopening Studio.

Snapshot

The camera button of the preview saves a picture of what it shows, next to the document or wherever you choose. A dialog shows the picture and asks for a format:

FormatWhat it holds
PNG, JPEG, WebPThe 8-bit picture of the preview. PNG and WebP keep the transparency; JPEG draws it on black.
TIFF (Pro)8 bits per channel, with transparency.
OpenEXR · 16-bit float (Pro)Half floats.
OpenEXR · 32-bit float (Pro)Full floats.
TIFF · 32-bit float (Pro)Full floats, for the software that reads a float TIFF.
Photoshop (PSD) · 8-bit (Pro)One transparent layer called Shader, and the merged picture. For Photoshop, Affinity Photo, Krita and GIMP.
Photoshop (PSD) · 16-bit (Pro)Whole numbers (0 to 65535), values out of 0 to 1 are clamped. The merged picture with the transparency as an alpha channel.
Photoshop (PSD) · 32-bit float (Pro)Full floats. The merged picture with the transparency as an alpha channel; Photoshop reads a 32-bit file as linear light.

A snapshot saved in the folder you have open appears in the explorer at once. A TIFF, an OpenEXR or a Photoshop file opens in the studio's image viewer, which shows it for a screen (light encoded for sRGB, values under 0 or over 1 clamped): to check the numbers, open it in your editing software. The viewer reads uncompressed and ZIP OpenEXR, uncompressed or deflated TIFF, and PSD and PSB (8, 16 and 32 bits; RGB, grayscale, indexed, bitmap and CMYK, which is converted approximately, without the color profile of the file); for another compression or mode it says so. A Photoshop file shows the merged picture stored beside its layers: one saved without Maximize Compatibility has a blank one, and the viewer says so instead of showing white.

A file the studio has no viewer for (a PDF, a Word file, a Blender scene…) shows the icon of its application in the explorer. Its context menu has Open (the application the system has for it) and Open With…; a double-click only selects it. A program (an .exe, a script, an .app…) is never opened from there: it is only shown in the file manager.

Floating-point pictures

A screen holds 8 bits per channel: nothing under 0 or over 1, and 256 steps between. A shader does not have that limit, and a normal map, a height map or a displacement map needs it: a normal has negative components, a height can be more than 1, and a slow slope in 8 bits turns into steps.

The three float formats do not take the picture of the screen. The preview draws the frame again, at its resolution, into a texture of 32-bit floats, and writes what the shader wrote: not clamped, not rounded, not converted. A half float keeps about 3 decimal digits and goes up to 65 504; a float keeps 7 digits.

Values says what the numbers mean:

  • As drawn (data), the default: nothing is done to them. For normal, height and displacement maps, masks, depth, anything that is not a color. What the shader writes is what the file holds.
  • Color (sRGB to linear light): the numbers are sRGB, as the shader of a picture usually writes them. The file is in linear light with the alpha multiplied in, which is what compositing software expects of an EXR.

Things to know:

  • The size is the one of the preview: choose it in the resolution menu before the snapshot. A float file of 4096 × 4096 weighs 256 MB in memory while it is written.
  • A pass with a TARGET is 8-bit unless it says "FLOAT": true. If the last pass, or one that feeds it, keeps its result in a target without FLOAT, the precision is lost there, whatever the format. Give the target "FLOAT": true to keep it.
  • The frame is drawn once more: a shader that keeps a state from one frame to the next (a PERSISTENT target) goes one step on.
  • The transparency of the file is the alpha the shader writes. With the Alpha toggle off, the preview leaves the alpha out: the file has an alpha of 1 everywhere.
  • A graphics card that cannot draw into floats cannot write the 32-bit formats; the 16-bit OpenEXR is then written from the 8-bit picture, with the precision of the screen.

Performance

The Performance tab, next to the Console, tells how much of a frame a shader takes, and where to look when one that used to run smoothly has become slow. Measures are paused when you open the tab: press Resume the measures to start them, and Pause the measures to keep a reading.

  • The budget of a frame. A bar shows how much of the time of one frame the graphics card takes, at the rate you aim at (24, 30 or 60 frames per second).
  • The rate reached, on average and at its lowest, and the longest frame.
  • Estimated GPU time at 720p, 1080p, 1440p, 4K and 8K, as milliseconds and the frame rate they would allow. It is an estimate: the cost of a shader follows the number of pixels.
  • A warning when the preview is drawn by a software renderer, which is far slower than a graphics card and not what the shader will cost on yours.

If your graphics card cannot report its time, the milliseconds are not shown: this is what the card can report, not the cost of the shader. The frame rate is still measured.

The computer

The button at the far right of the tab shows a card with your computer: its system, processor, memory, graphics card and the version of ISF Studio. Copy the measures as text and as Markdown copy the measures together with this description, whether the card is shown or not. Paste it when you report a problem, or to compare two computers.