View in #shaders on Slack
@kjetilh: hi, anyone here who has used custom expressions in ue4 material editor? I wonder if there is a list of available engine parameters and properties somewhere. For example I need to access depth and postprocessinput0 inside a custom expression. And functions for converting between spaces and such things.
I’ve used a rendertarget for now for the textures but less than ideal to do that when those buffers are available.
@snake5: can’t they be hooked up as inputs?
@teessider: they can be hooked up as inputs (still restricted to their respective material domains unless you make engine changes)…The parameters available to a shader differ depending on the type (Landscape vs Opaque eg.). To see what a node actually outputs to hlsl, you can plug it in the emissive input and open the HLSL code window, copy the code to a text editor and search for something like
In terms of available parameters - you can start with
/Engine/Shaders/Private . In general looking through the
/Engine/Shaders/Private is good
there is also this: https://api.unrealengine.com/INT/API/Runtime/Engine/FViewUniformShaderParameters/index.html but that is from C++ POV and they might have different names in the shader files.
@kjetilh: ah, great info! Appreciate it. Good tip with the hlsl window. I forgot that was there
that should really solve the issue. Super!
@teessider: no problem Yeah they don’t make the HLSL code window obvious and I have been doing more custom node stuff recently so I have been discovering more stuff I can do with it
Cool links about using the Custom Node:
https://www.youtube.com/watch?v=HaUAfgrZjlU <---- Cool livestream from Epic about using the Custom node (from Ryan Brucks)
https://shaderbits.com/blog <-- Ryan Brucks’s Blog contains more awesome stuff
http://blog.kiteandlightning.la/ue4-hlsl-shader-development-guide-notes-tips/ <— A Collection of various links which go into more stuff about using Custom Nodes
YouTube Video: Custom Material Node: How to use and create Metaballs | Live Training | Unreal Engine
Kite & Lightning: Blog: UE4 HLSL & Shader Development Guide, Notes, & Tips - Kite & Lightning: Blog
@kjetilh: excellent, will dive into those