i'm getting this error, do you know how to "bypass" it? any suggestions?
Code: Select all
error X6077: texld/texldb/texldp/dsx/dsy instructions with r# as source cannot be used inside dynamic conditional 'if' blocks, dynamic conditional subroutine calls, or loop/rep with break*.Code: Select all
// rendering on a "cinema" quad aligned with rrt1 and rtt2
float4 main_fp(
float4 colorIN : COLOR,
float2 texCoord: TEXCOORD0,
uniform sampler front: register(s0), //rtt cube clockwise
uniform sampler back: register(s1), //rtt cube anticlockwise
uniform sampler modtex: register(s2) //pre-int 3d texture 32MB 256*256*128
) : COLOR
{
// rendering to rtt a cube with vertex colors=coords (0->1)
float4 frontC = tex2D(front, texCoord);
// rendering to another rtt the same cube anticlockwise
float4 backC = tex2D(back, texCoord);
// building the "directions" texture
float4 tempdirtex = backC - frontC;
float4 dirtex = float4(normalize(tempdirtex.xyz),length(tempdirtex));
//raytracing
float4 colorSample;
for(int i=0;i<dirtex.a;i++)
{
//test method, very simple
colorSample += tex3D(modtex, frontC + dirtex * i);
if(colorSample.a == 1.0) break;
}
return colorSample;
}
