How to Debug Shaders

Node-based Shader Editor

How to Debug Shaders

Postby JohnnyDalvi » Tue Jan 23, 2018 11:51 am

Hello,

I was wondering if it would be possible to see the actual values of the variables within a shader while it is running, perhaps an option to choose a pixel in the screen/object so we can access all the values regarding the rendering of that specific pixel. Or any other way to do something that would allow me to check variable values in the middle of the node editor instead of just being able to see the debug input color. This would be great.
JohnnyDalvi
 
Posts: 4
Joined: Fri Jan 19, 2018 6:26 pm

Re: How to Debug Shaders

Postby Amplify_Borba » Tue Jan 23, 2018 12:23 pm

Hello JohnnyDalvi, thank you for getting in touch!

We intend to provide a few related options in the future for value preview and debug, and although it might not seem like it, its in fact a complex subject.

Could you further elaborate on what specific values and effects you're looking to debug?

For now, feel free to make use of the Debug port in the Output Node, which allows you to preview connected nodes directly in the viewport on any assets using the shader.
Connecting wires to the Debug port will not break existing connections, so it's a great way to visualize what you are building without destroying existing complex connections.

You may also consider the following debugging options available through Unity and Visual Studio:
Unity - Frame Debugger
Unity - Debugging DirectX 11 shaders with Visual Studio
Unity Community - Debugging shaders in Visual Studio

Please let me know if the shared information helped, looking forward to your reply!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: How to Debug Shaders

Postby JohnnyDalvi » Tue Jan 23, 2018 3:11 pm

Thanks for the fast reply, amazing support service!

This indeed would be awesome. Isn't related to a specific shader or effect, overall I'd be able to figure way faster why a shader isn't giving me the expected result by being able to see the exact number that goes out from an "Multiply" node for example, or even the output displayed as float4 right after an "Add" node between two colors, just like the debugging tools available for scripts in some IDE.

The Debug input is indeed a very useful tool, but the ability to see variables within the nodes like I suggested would be priceless.

I've just browsed those links you've shared, that's helpful, stepping in through the shader like that is very powerful to whom use VS (which I do), I'll take a further look at this option. Thanks again!
Last edited by JohnnyDalvi on Tue Jan 23, 2018 6:46 pm, edited 2 times in total.
JohnnyDalvi
 
Posts: 4
Joined: Fri Jan 19, 2018 6:26 pm

Re: How to Debug Shaders

Postby Amplify_Borba » Tue Jan 23, 2018 4:57 pm

JohnnyDalvi wrote:Thanks for the fast reply, amazing support service!

This indeed would be awesome. Isn't related to a specific shader or effect, overall I'd be able to figure why a shader isn't giving me the expected result by being able to see the exact number that goes out from an "Multiply" node for example, or even the output displayed as float4 right after an "Add" node between two colors, just like the debugging tools available for scripts in some IDE.

The Debug input is indeed a very useful tool, but the ability to see variables within the nodes like I suggested would be priceless.

I've just browsed those links you've shared, that's helpful, stepping in through the shader that is very powerful to whom use VS (which I do), I'll take a further look at this option. Thanks again!


Thank you for the kind words and for providing additional details, we'll be sure to take your feedback into consideration as soon as we're able to look into this matter.

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback. Every bit helps, your feedback is extremely valuable to us!

Please don't hesitate to get back in touch if you have any further questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: How to Debug Shaders

Postby JohnnyDalvi » Tue Jan 23, 2018 5:55 pm

Just rated it over there :D
JohnnyDalvi
 
Posts: 4
Joined: Fri Jan 19, 2018 6:26 pm

Re: How to Debug Shaders

Postby Amplify_Borba » Tue Jan 23, 2018 6:48 pm

JohnnyDalvi wrote:Just rated it over there :D


We are humbled by your kind words and support, thank you so much!

Please let us know when you have any further questions, we'll be glad to assist!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests