Helloo..
I gotta shader code which tries to find an element from an array
for (i = 0; i < 13 ; i++)
{
mini = i;
for (j = i+1; j < 25; j++)
{
if (b[j] < b[mini])
{
mini = j;
}
}
minor = min( b, b[mini] );
major = max( b, b[mini]);
b = minor;
b[mini] = major;
}
It ended up giving a compilation error
error X3500: Array reference cannot be used as an l-value,not natively addressable
The statement b[mini] = major is where compiler has problem with.
My doubt is if b = minor is a valid operation then why not the other???
Am confused.......
Am using PS 3.0
Help meee
I gotta shader code which tries to find an element from an array
for (i = 0; i < 13 ; i++)
{
mini = i;
for (j = i+1; j < 25; j++)
{
if (b[j] < b[mini])
{
mini = j;
}
}
minor = min( b, b[mini] );
major = max( b, b[mini]);
b = minor;
b[mini] = major;
}
It ended up giving a compilation error
error X3500: Array reference cannot be used as an l-value,not natively addressable
The statement b[mini] = major is where compiler has problem with.
My doubt is if b = minor is a valid operation then why not the other???
Am confused.......
Am using PS 3.0
Help meee