From 777b3d5ca7287c85dd8a801d897dc6961ee11771 Mon Sep 17 00:00:00 2001 From: sunag Date: Mon, 31 Mar 2025 13:10:55 -0300 Subject: [PATCH] show shader stage --- src/nodes/utils/DebugNode.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nodes/utils/DebugNode.js b/src/nodes/utils/DebugNode.js index 14839d2c1317b4..3840291adc8687 100644 --- a/src/nodes/utils/DebugNode.js +++ b/src/nodes/utils/DebugNode.js @@ -41,11 +41,14 @@ class DebugNode extends TempNode { const callback = this.callback; const snippet = this.node.build( builder ); + const title = '--- TSL debug - ' + builder.shaderStage + ' shader ---'; + const border = '-'.repeat( title.length ); + let code = ''; - code += '// #--- TSL Debug ---#\n'; + code += '// #' + title + '#\n'; code += builder.flow.code.replace( /^\t/mg, '' ) + '\n'; code += '/* ... */ ' + snippet + ' /* ... */\n'; - code += '// #-----------------#\n'; + code += '// #' + border + '#\n'; if ( callback !== null ) {