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;
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;
#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
Thanks for reply...
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...
Torque Owner DreamPharaoh
Gods and Nemesis
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.