• "I'm going to pee in your seat" - Jenson Button
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The 2017 Formula One Monaco Grand Prix. Join the conversation here.
  3. If you have any questions, please don't hesitate to ask. There's no such thing as a stupid question.

CG error

Discussion in 'Racer Problems & Fixes' started by AndyM09, Jan 4, 2012.

  1. AndyM09

    AndyM09

    Messages:
    2
    Ratings:
    +0
    Hello!
    I have an laptop with i5 2430M and nVidia GeForce 520MX with 1gb dedicated, but racer with cg not running.
    What can I do?
    I can play Crysis 2 at high, GTA 4 at high, and I can't play racer?

    check out this: http://vdtruck.net/store/Untitled.png
     
  2. radome

    radome

    Messages:
    166
    Ratings:
    +24
    int iSqrtSamples=max(iSqrtSamples-index,2);
    is what my latest copy of that file has in that line (87)
    What about yours?
     
  3. AndyM09

    AndyM09

    Messages:
    2
    Ratings:
    +0
    I not understand.
    Can you be much explicit, please?
     
  4. radome

    radome

    Messages:
    166
    Ratings:
    +24
    Whatever version you are trying to run has in its ...racer\data\renderer\shaders\shadowmapping.cg shader program source file
    a statement at line 87 that does not make sense to the shader program compiler. Namely; max(int,int), which should be comparing variables to variables, or variables to constants, but this seems to be comparing a type to a type. Nonsense. I can't tell you how that got there. I don't know if this source is pre-processed at some point. What version are you trying to run?

    Our laptop graphics cards are both in class 3 with respect to suitability
    http://www.notebookcheck.net/NVIDIA-GeForce-GT-520MX.54717.0.html
    (mine's a Quadro NVS 160M way below the GT 520MX in the list)
    Those files are created at the time of the build. If your cg files are not corrupt then maybe you have a driver issue. Maybe the runtime pre-processor is plugging those nonsense values in there due to an old or otherwise unsuitable driver.
     
  5. Stereo

    Stereo

    Messages:
    2,257
    Ratings:
    +1,219
    Actually, the error means the compiler is seeing max(int a, int b) which isn't a valid set of variables for max().
    You could I suppose get rid of it by writing the line int iSqrtSamples=max(float(iSqrtSamples-index),2.0f);

    Not sure why other cards don't have the issue; maybe they do the conversion automatically.