How many times do you ask yourself what is the value of a plug when you build a shader?
WkDrawValue is a shading tool that allow you to display the value of many kinds of connections.
Version:
1.0
Released:2015/11/05
UE4:4.9
 


This shader can be used either as a standalone material to view the curve of some functions you know the equation or its main nodes can be imported into a shader you are working on to check the value of some variables.
It is intended to be used primarly as a tool, not as an in-game shader. Although the code shouldn't be resource consuming, I didn't really check the performances.

 

  • WkDrawValues_Overview

Features and notes

  • Display the value of time, functions at a given point, parameters...

Limitations:

  • Because of the nature of the shaing language the value of anything related to U or V cannot be displayed because it is changing all the time during the shader evaluation.

 

Installation

Download the package and unzip the content (be careful not to create a folder with the name of the archive) directly at the root of the Content directory of an UE4 project.

Then launch the UE4 project. You should find the WkDrawValue data in the following folder:

.\Content\WkLibrary\WkMaterials\WkDrawValue\

 

WkDrawValue use

WkDrawValue is basically containing 2 material functions:

  • MF_DrawValue: Displays the value of the input connection at the specified texture coordinates of the material in which it is instanciated.
  • MF_DrawValues: Displays up to 4 values at the same time, also at the specifed texture coordinates.

To use one of them just in the shader you are working on just right click to call the functions lister dialog box and instantiate one or the other. Then plug a connection into the Value input. To display the values now connect the output of the WkDrawValue node into a Lerp node and connect it into the Emissive plug of the material.

 

Examples

In the Materials folder of WkDrawValue you will find 2 sample materials that illustrate possible uses of this material function.

 

 

Change log

     - V1.0 (05/11/2015):    UE 4.9
            - basic version