• Stars
    star
    117
  • Rank 300,277 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Screenshots a Shader Graph in multiple sections, stitches them together and saves the result as a PNG

Shader Graph to PNG

GraphToPNG

Tested with Unity 2020.3.0f1, Shader Graph v10.3.2

Screenshots a Shader Graph in multiple sections, stitches them together and saves the result as a PNG.

If there is any errors (in any Unity/SG version) or problems with the final image, feel free to open an issue and I'll try fixing it ~

Setup:

  • Install via Package Manager β†’ Add package via git URL : https://github.com/Cyanilux/ShaderGraphToPNG.git
  • Alternatively, download and put the GraphToPng script in an Editor folder anywhere in Assets

Usage:

  1. Open up a Shader Graph. Close the Main Preview, Blackboard and Graph Inspector windows
  2. Zoom and move the graph, and size the window such that the graph you want to capture is visible
    • Tip : Can use the "A" keybinding to auto-focus the whole graph
  3. Right-click anywhere in the graph and select "Graph To PNG" from the dropdown menu
    • (If you don't see this listed in the menu, try restarting Shader Graph)
    • Processing is done through a series of screenshots, so make sure nothing is covering the shader graph window
  4. When done, the image will be saved in Assets/ShaderGraphScreenshots, using the graph name, as printed in the Console window
    • Note : Numbers may be appended to the filename to prevent overriding previous screenshots of the same graph

Known Issues :

  • Because the graph may be captured in multiple screenshots, previews that use the Time node may not be consistent. Maximising the Shader Graph window will capture using less screenshots so may help reduce this.

Authors :

  • GLURTH#7422
    • Reflection, Screenshot & Stitching and File regions
  • Cyanilux (https://twitter.com/Cyanilux)
    • Processing region. Fixed position/scaling & stitching issues with the DoShaderGraphToPng function
    • Replaced EditorWindow with "Add Tool to Shader Graph Menu" region which adds "Graph To PNG" to the right-click menu in SG.

More Repositories

1

URP_BlitRenderFeature

Blit Render Feature for Universal RP's Forward Renderer. Set specific source/destination via camera source, ID string or RenderTexture asset. Also options for _InverseView matrix and _CameraNormalsTexture generation.
C#
565
star
2

URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
HLSL
524
star
3

URP_ShaderCodeTemplates

A few shader code templates/examples for Unity, Universal Render Pipeline (URP v10 / Unity 2020.3). ShaderLab & HLSL.
ShaderLab
267
star
4

ShaderGraphVariables

Adds 'Register Variable' and 'Get Variable' nodes to Shader Graph, allowing you to link sections of a graph without connection wires. <3
C#
251
star
5

URP_WatercolourShaders

A few experiments with watercolour-like shader effects made using Shader Graph. Unity 2020.1.2f1, URP 8.2.0
C#
180
star
6

BakeShader

Unity editor tool for baking shaders to textures. Texture2D, Texture3D, Flipbook, or MeshRenderer (uses model UV)
C#
163
star
7

URP_RetroCRTShader

A shader graph which replicates some retro tv/monitor effects. CRT (cathode-ray tube) warping, scanlines, static, distortion, etc.
C#
141
star
8

Cards

A few scripts which controls interactions for a hand of cards. Card model, shadergraph and example setup included.
C#
128
star
9

ToDo

Unity in-editor to-do list, attached as a component and uses a custom inspector based on ReorderableList. Also see branches for ScriptableObject / cross-scene reference version.
C#
81
star
10

URP_GrassGeometryShader

Example of a Grass Geometry Shader for Unity, Universal Render Pipeline. Based on https://github.com/IronWarrior/UnityGrassGeometryShader
HLSL
63
star
11

cyanilux.github.io

Tutorial/blog site, generated using Hugo
HTML
2
star