I’ve been working with the Unreal Engine source code directly, rather than using the launcher version. I’ve made modifications to the engine source to create a custom shading model. However, I’ve encountered an unusual situation that I’d like to understand better.
In the editor, my custom shader is showing an instruction count of around 3000. Despite this high number, the actual performance doesn’t seem to be significantly impacted. I’m concerned about whether this discrepancy could indicate a more serious underlying issue.
Questions:
- Is this high instruction count normal for custom shaders implemented at the engine source level?
- Could this discrepancy between the displayed instruction count and apparent performance indicate any potential problems or risks?
- How can I verify that my modifications haven’t introduced any hidden issues or instabilities in the shader compilation or runtime processes?
- Which parts of the shader code typically influence the instruction count calculation? (I’m asking in case it’s possible to modify and reduce the count.)
- If this high instruction count isn’t causing actual performance issues, is it safe to proceed with using this shader in production?
I’m particularly concerned about whether this situation could lead to any critical issues in production. Any insights or advice would be greatly appreciated, especially from those experienced with engine-level modifications. Thank you (There might be an error because I used a translator)
Most of my modifications were based on the tutorial found at:
custom shading model with some nodes
Opaque Default lit (no node)