https://github.com/JPBotelho/ShaderExporter
Editor tool for exporting renders of procedural pixels shaders using ShaderGUI in Unity.
https://github.com/JPBotelho/ShaderExporter
shaders unity
Last synced: about 1 year ago
JSON representation
Editor tool for exporting renders of procedural pixels shaders using ShaderGUI in Unity.
- Host: GitHub
- URL: https://github.com/JPBotelho/ShaderExporter
- Owner: JPBotelho
- License: mit
- Created: 2018-03-24T09:14:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-13T13:52:32.000Z (about 8 years ago)
- Last Synced: 2024-11-10T21:39:13.136Z (over 1 year ago)
- Topics: shaders, unity
- Language: C#
- Size: 19.5 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ShaderExporter
Editor tool to export images from fully procedural pixel shaders in Unity.
Custom ShaderGUIs (shader inspectors) expose the target material property, which can be used to process anything.
This script passes an empty texture with XY size and blits it with the target.
You can adapt this so that instead of blitting an empty texture it blits one you give it.
Adapted from my 'Fractal-Megacollection' repository. It was a lifesaver for exporting fractal renderings without losing resolution.
# Contains
## ShaderExporter.cs
Contains the Texture Exporting code.
1. Gets Path to save to
2. Creates RenderTexture with XY size
3. Blits Material to RT
4. Convers RT to Texture2D
5. Writes Texture2D to file
## ExampleEditor.cs
Contains a custom ShaderGUI that demonstrates how to use the ShaderExporter.

# Consider buying me a coffee if you like my work (click the image)
[](https://www.buymeacoffee.com/ZcRuWpUBf)