5
Vote

'fx' compilation problems

description

Hi,
 
I try to compile the solution, but I got the following errors during the compilation.
I run it on Windows XP with VS2008 with .NET 3.5 SP1
 
Here are the errors :
 
Error 4 error X5608: Compiled shader code uses too many arithmetic instruction slots (65). Max. allowed by the target (ps_2_0) is 64.
D:\effectslib\ShaderEffectLibrary\TransitionEffects\ShaderSource\LeastBrightTransitionEffect.fx 33  TransitionEffects
Error 5 error X5608: Compiled shader code uses too many arithmetic instruction slots (65). Max. allowed by the target (ps_2_0) is 64.
D:\effectslib\ShaderEffectLibrary\TransitionEffects\ShaderSource\MostBrightTransitionEffect.fx  33  TransitionEffects
Error 6 error X3500: asymetric returns from if statements not yet implemented
D:\effectslib\ShaderEffectLibrary\TransitionEffects\ShaderSource\ShrinkTransitionEffect.fx  30  TransitionEffects

comments

ptallett wrote Jan 26, 2009 at 4:31 PM

I got the same error, not sure why. I removed the three offending shaders and their effects classes and the rest work fine.

wrote Mar 9, 2009 at 5:43 AM

tjoe wrote Jun 5, 2009 at 2:18 PM

For the LeastBrightTransitionEffect and MostBrightTransitionEffect, you can change the "c" variable from 4 to 3. This reduces the number of arithmetic instruction slots needed. For the ShrinkTransitionEffect, you can change the code inside the offending if-statement. Update it to assign the result of the text2D call to the variable "c1", instead of returning the value directly.

infohoon wrote Jun 19, 2009 at 5:42 AM

Also I got the same error message, so that file just removed. and then it's worked. Thanks

wrote Jul 15, 2009 at 3:05 AM

odahan wrote Jul 15, 2009 at 3:06 AM

I have the same problem with Ripple.fx (65 slots used instead of 64 max). Is there a way to simplify Ripple.fx code to get one less slot ?

wrote Feb 23, 2010 at 1:39 PM

wrote Mar 7, 2010 at 12:14 AM

wrote Feb 21, 2013 at 11:44 PM