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!
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.
Think you're using an old macro. From 494 readme: Some shader macro prototypes have changed. Look in pShaderStubs.h for changes.
I'm not using an old macro; this is what you guys are shipping with the SDK as an example. I'll give it a go using the updated stubs/macros in the mean time.
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.
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'.
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;
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.