spectral

Compilator error

Discussion created by spectral on Mar 3, 2011
Latest reply on Mar 3, 2011 by eugenek

I have the following code. And I got this error :

 

error: operand of "*" must be a pointer

   rayHit->P += RAY_EPSILON * rayHit->Ng;

 

 

If I do "rayHit->Ng * RAY_EPSILON" I have no problem.

Some precision, Ng is a float3 and RAY_EPISOLON is a #define.

void faceForward(RayHit* rayHit, float3* wo) { rayHit->P += RAY_EPSILON * rayHit->Ng; }

Outcomes