REM ****************************************************************
REM
REM Load and compile the Effect file
REM
REM ****************************************************************
IF V% THEN PRINT"Compiling Effect File."
SYS D3DXCreateEffectFromFile%, pDevice%, ShaderVersion$, 0, 0, 0, 0, ^Effect%, ^Errorlog%
IF Effect% = 0 THEN
SYS !(!Errorlog% + 12), Errorlog% TO B%
ERROR 100, "Failed to Compile Effect. Sorry, you do not appear to be able to compile this shader with your graphics card.."+CHR$13+CHR$13+$$B%
ENDIF
REM ****************************************************************
REM
REM Find the first Valid technique in the Effect file
REM This is the Mandel effect
REM
REM ****************************************************************
IF V% THEN PRINT"Getting Effect Mandel."
REM ID3DXEffect::FindNextValidTechnique
SYS !(!Effect% + 240), Effect%, 0, ^Technique1% TO R%
IF R% THEN ERROR 100, "Could not find the effect : Mandelbrot"