Just tried to compile Sphere2 DLL with DirectX SDK Jun 2007 and added [unroll] above the for loop on line 321 in parallax.fx:
Code:
VS_OUTPUT_STRUCTV VS_PASSV( VS_INPUT_STRUCTV vsInStruct )
{
VS_OUTPUT_STRUCTV vsOutStruct;
vsOutStruct.Fog = 10000;
vsOutStruct.position = mul( vsInStruct.position,matWorldViewProj );
vsOutStruct.texcoord = vsInStruct.texcoord0;
float4 PosWorld = mul(vsInStruct.position, matWorld);
float3 Norm = normalize(mul(vsInStruct.normal,matWorld));
vsOutStruct.LightColor=0;
[unroll]
for (int i=6; i<numlights; i++)
{
vsOutStruct.LightColor+=vertLight(PosWorld,Norm,vecLightxyz[i].xyz,vecLightrgba[i]);
}
return vsOutStruct;
}
Run a little test and got error: (although the unroll helped a little)
parallax.
fx line: 2807
Code:
technique depthpass
{
pass p0
{
cullmode=ccw;
alphablendenable=false;
zenable=true;
zwriteenable=true;
stencilenable=false;
alphatestenable=false;
VertexShader = compile vs_2_0 VS_PASSD(); // vs_1_1 produced the error
PixelShader = compile ps_2_0 PS_PASSD();
//VertexShader = compile vs_1_1 VS_PASSD();
//PixelShader = compile ps_1_1 PS_PASSD();
}
}
Done.