Here is two tips that may be usefull if you want to debug your shader.
There is many ways to debug shaders in Unreal Engine. For example, you can translate your shader into HLSL code and use any software that you like for debug that. Or install a Renderdoc plugin to capture a whole frame in Unreal's viewport and jump to Renderdoc. You can read more about it here.
But sometimes you don't want to dig deeper when debugging and use a third-party software, especially if you are not going to solve something complicated, but want to debug some value or see what shader does after interpretation in hlsl.
There is a very usefull MaterialNodes for debugging values:
- DebugScalarValues
- DebugFloat2Values
- DebugFloat3Values
- DebugFloat4Values
- DebugBinaryValues-Int
- DebugBinaryValues-Float
- DebugTimeSine
- Number is a value that we would like to debug
- MaximumNumberOfDigits
- DebugTextlocation
- UVs
DebugScalarValues |
This nodes are extremely helpfull, if you need to see what is inside of a few variables independent of pixel position. If you are looking for a way to control values for each pixel in a frame, you need more complex solution as was written above.
If you need a hlsl code of your shader you can get it from a window menu:
Комментариев нет:
Отправить комментарий