Problem with example shader.

Discussion in 'Modding' started by blakboks, Mar 18, 2014.

  1. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Hey guys,
    I'm trying to just test the example shader that's provided in the SDK, but I'm getting an error. The error I'm getting is: "vs30_sampleBumpCmapSpecMapT0ShaderMacros.h(175,43): error X3018: invalid subscript 'Tex 4'." Since I don't think I've modified the code at all, except to give it a unique description and to comment out the "Define=(TestCompile,1)" lines, I'm wondering if this is anything I can fix myself (or may have somehow caused), or if it's embedded in the mentioned ShaderMacros.h that's in the encrypted CoreShaders.mas, and there's no current work-around?
    Thanks in advance for any help anyone can provide!
     
  2. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Update with the new build 590:

    The error now reads:
    "ps30_sampleBumpCmapSpecMapT0PShaderMacros.h(936,19): warning X3206: implicit truncation of vector type
    PShaderMacros.h(939,19): warning X3206: implicit truncation of vector type
    C:\Users\Chris\Documents\rFactor2\ModDev\memory(89,19): errorX3004: undeclared identifier 'compute RefVec'".

    I've tried re-exporting the object with the test material applied from 3DSMax again, and that didn't affect anything.
     
  3. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
    Think you're using an old macro. From 494 readme: Some shader macro prototypes have changed. Look in pShaderStubs.h for changes.
     
  4. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    I'm not using an old macro; this is what you guys are shipping with the SDK as an example. :D

    I'll give it a go using the updated stubs/macros in the mean time.
     
  5. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Ok, I seem to have sorted out the pixel shader issues, but I'm now still getting the original error with the vertex shader.

    I've gone through the whole Vertex Shader, and I can't see where it's calling a macro that doesn't exist, that has the wrong number of arguments, or the wrong arguments in the wrong place or anything.

    Note: There doesn't seem to be a Tex4 anywhere in any of the supplied files. I know the error codes are often completely useless; but I can't see anything wrong with the vertex shader.
     
    Last edited by a moderator: Mar 22, 2014
  6. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
    Will ask and also ask about the example being updated.
     
  7. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Thanks Tim!
     
  8. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Any update to getting this issue resolved?
     
  9. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    I just installed b660 SDK; noticed that the shaders were updated 3/24/14. I did nothing but comment out "Define=(TESTCOMPILE, 1)" in the .gfx. I'm still getting the same error--invalid subscript 'Tex 4'.
     
  10. Joe Campana

    Joe Campana Registered

    Joined:
    Jan 19, 2012
    Messages:
    129
    Likes Received:
    2
    Sorry about the mixup - just add the bolded line to your VS_INPUT structure in your .vsh file:
    Code:
    float2 Tex3       : TEXCOORD3;
    [B]float2 Tex4       : TEXCOORD4;[/B]
    float4 Index      : BLENDINDICES;
    
     
  11. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Ahhh, great! Thanks so much, Joe!

    I think I see now why that could cause an issue, even though Tex4 is never referenced in the vertex shader itself.
     

Share This Page