HLSL Material

Voxel Plugin - Code Plugins - Jan 3, 2022
6
4.5 out of 5 stars(6 ratings)
  • 83%
  • 0%
  • 0%
  • 17%
  • 0%

Write material functions directly in HLSL

  • Supported Platforms
  • Supported Engine Versions
    4.26 - 4.27, 5.0 - 5.2
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

This plugin will not be ported to newer versions of the engine

Unreal Engine 5.4 introduced much nicer custom nodes, making this obsolete.


Ever wanted to write complex material functions directly in HLSL? Now you can!


Demo: https://twitter.com/phyronnaz/status/1454988373467222024

Github: https://github.com/Phyronnaz/HLSLMaterial

Support: https://discord.gg/UjtexdkWxC



Features
  • HLSL support: write all your functions in a single hlsl file and use any of them in regular materials
  • Team-friendly: regular material functions are generated, so your team members don't need the plugin to use them!
  • Live updates: material functions & opened material editors are refreshed when saving the hlsl file (Windows only)
  • Comment support: comments are parsed & pin tooltips are set accordingly
  • Smart updates: only modified functions are updated
  • Texture parameters support
  • Bool parameters support
  • Define support
  • Includes support (with auto updates when included files are edited)
  • Default value support
  • Clickable errors: errors are properly displayed relative to your file(s), and clicking them will open your IDE




How to
  • Create a new HLSL Material Function Library (right click Content Browser -> Material & Textures). This asset will be the link between your hlsl file and all the generated material functions.
  • Set the File on it to point to your HLSL file
  • Add functions to the file
  • Material functions will be created when you save the HLSL file
  • You can also disable the automatic updates and manually right click the asset -> Update from HLSL




Syntax
  • All return types must be void to ensure the pins are all properly named
  • To mark a parameter as an output, use out: eg, out float3 MyOutput
  • Comments must use the // syntax, /* is not supported
  • @param in comments will be parsed & put into the pin tooltips

Examples

Technical Details

Editor only plugin, can be used in a team without everyone having the plugin