Game Development Community

shader issues

by Howard Dortch · in Torque 3D Professional · 04/22/2014 (4:00 pm) · 3 replies

I keep getting this warning on 8 or so of the procedural shaders

shaders/procedural/7c55752361289902_P.hlsl(84,21): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

Anyone know what causes it? What do I need to do to stop the console spam?

line 84 I assume is the issue. I looked in the scripts and dont see any negative numbers for the d_specular.

// Pixel Specular [Deferred]
float specular = pow( d_specular, ceil(specularPower / AL_ConstantSpecularPower)) * specularStrength;
OUT.col += float4( specularColor.rgb, 0 ) * specular * bumpSample.a;

#1
04/22/2014 (9:08 pm)
I have these issues as well once in a while. I have not had time to devote attention to it, but my newest speculation is not having particle effects added in as mission objects and not deleting them because I am guilty of not having a scheduled delete for newer particle effects that I am trying out.
Please let me know of your findings because this can be useful since it was an obvious issue in the mind of the originating programmer of this warning.
#2
04/22/2014 (9:47 pm)
I never had this issue until I converted my engine to the DirectX9/X11 Refactor by Anis, so it appears that something has changed in the engine to cause this. I went from the github build 3.0 to the 3.5.1 and installed Refactor without running 3.5.1, so I don't know if the changes happened in Anis' version or the official version. My game seems to continue functioning correctly, so in my case, the warnings seem to be harmless. I don't mind these warnings being there, in case something does go wrong, I'll have some clues where to look.
#3
04/23/2014 (9:16 am)
The warnings seem to pop up during the loading phase. As I said I checked all the particle, specular data and dont see a negative number or any pre calculations. No effect in the operation but like to find the reason.
Thanks for reply...