wraitii Posted July 6, 2012 Report Share Posted July 6, 2012 Thing is, I'm pretty sure I can't even do this sort of small checks without the extension (IF doesn't exist in basic ARB)... In which case, I might just as well use it. But then I need a way to check that the computer has the extension, or deactivate parallax mapping (else it'd crash).By correct, you mean that the other parameters are still important or not? Quote Link to comment Share on other sites More sharing options...
myconid Posted July 6, 2012 Author Report Share Posted July 6, 2012 Thing is, I'm pretty sure I can't even do this sort of small checks without the extension (IF doesn't exist in basic ARB)... In which case, I might just as well use it. But then I need a way to check that the computer has the extension, or deactivate parallax mapping (else it'd crash).You can. CMP, SLT, SGE are comparison instructions. Look at the reference.By correct, you mean that the other parameters are still important or not?Not sure which other parameters you are referring to. You transformed the normal in the vertex shader and then drew that exact result in the fragment shader and it looks wrong, yes? Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 6, 2012 Report Share Posted July 6, 2012 Well, no. I multiply the unmodified instancingMatrix with a_normal, and the normals that come out are right, and parallax works properly and everything.Didn't notice those operators, thanks. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 6, 2012 Author Report Share Posted July 6, 2012 Well, no. I multiply the unmodified instancingMatrix with a_normal, and the normals that come out are right, and parallax works properly and everything.Oh, you mean the rest of the 4x4 instancingMatrix. No, those aren't needed. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 6, 2012 Report Share Posted July 6, 2012 (edited) Well, then, I don't understand why it would be wrong (mathematically, I mean) to multiply the normals using: vec3 normal = ((instancingTransform) * vec4(a_normal,0.0)).rgb;instead of vec3 normal = mat3(instancingTransform) * a_normal; (which is what you, with success, used)And while the second one doesn't work on my computer, the first does, for some reason, so I'd rather both be correct.(Same with the tangents using that: vec4 tangent = vec4(((instancingTransform) * vec4(a_tangent.xyz,0.0)).rgb, a_tangent.w); ).I've pushed the ARB parallax shader (here), in a version that doesn't require the extension (commented that code). Could anybody report if it works? Edited July 6, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
zoot Posted July 6, 2012 Report Share Posted July 6, 2012 I've pushed the ARB parallax shader (here), in a version that doesn't require the extension (commented that code). Could anybody report if it works?Which model should I use? I tried with structures/romans/temple_mars2 and got an error message but now I can't reproduce it.Does anyone know how I can reset the cache thingy used by the game? Quote Link to comment Share on other sites More sharing options...
feneur Posted July 6, 2012 Report Share Posted July 6, 2012 Which model should I use? I tried with structures/romans/temple_mars2 and got an error message but now I can't reproduce it.Does anyone know how I can reset the cache thingy used by the game?Just delete the files in the appropriate folder http://trac.wildfiregames.com/wiki/GameDataPaths should tell you where to find the folder for your OS Quote Link to comment Share on other sites More sharing options...
zoot Posted July 6, 2012 Report Share Posted July 6, 2012 (edited) Thanks.This is the error I get:ERROR: Failed to compile vertex program 'shaders/arb/model_common.vp' (line 45): line 35, char 39: error: invalid texture coordinate unit selectorERROR: Failed to compile vertex program 'shaders/arb/solid.vp' (line 1):ERROR: CRenderer::EndFrame: GL errors occurred Edited July 6, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 6, 2012 Report Share Posted July 6, 2012 (edited) What's your graphic card? There might be a limitation on the number of texture coordinate that it can pass... Otherwise I dunno what could cause this. Edited July 6, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 What's your graphic card? There might be a limitation on the number of texture coordinate that it can pass... Otherwise I dunno what could cause this.It's an integrated Intel graphics controller. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 7, 2012 Report Share Posted July 7, 2012 It's an integrated Intel graphics controller.Can you post your system_info.txt? That should have all the juicy details.Edit: anyone know the name of the limit / if it exists? We can use http://feedback.wildfiregames.com/report/opengl/ to see how widely supported it's likely to be. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 Sure. Here it is.system_info.txt Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 7, 2012 Report Share Posted July 7, 2012 That won't help much actually... I need to know the value of "GL_MAX_TEXTURE_COORDS" for you graphic card (on mine, its height, which is fairly standard, but if you have an Intel Card, it may be way lower.) If you can compile 0 A.D., you can add an std::cout << glGet(GL_MAX_TEXTURE_COORDS) << std::endl;I can also access it from some headers in my openGL framework, so you might be able to do a search for 'GL_MAX_TEXTURE_COORDS' and get the info. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 That won't help much actually... I need to know the value of "GL_MAX_TEXTURE_COORDS" for you graphic card (on mine, its height, which is fairly standard, but if you have an Intel Card, it may be way lower.) If you can compile 0 A.D., you can add an std::cout << glGet(GL_MAX_TEXTURE_COORDS) << std::endl;I can also access it from some headers in my openGL framework, so you might be able to do a search for 'GL_MAX_TEXTURE_COORDS' and get the info.Where exactly would I add that? Tried in main():../../../source/main.cpp: In function ‘int main(int, char**)’:../../../source/main.cpp:554:41: error: ‘glGet’ was not declared in this scope Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 This is the exact name reported by my OS:'Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)' Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 7, 2012 Report Share Posted July 7, 2012 (edited) Yeah, hadn't thought of that. Let's roll differently. Go to HWDetect.cpp, and change this#define INTEGER(id) do { \GLint i = -1; \glGetIntegerv(GL_##id, &i); \if (ogl_SquelchError(GL_INVALID_ENUM)) \scriptInterface.SetProperty(settings.get(), "GL_" #id, errstr); \else \scriptInterface.SetProperty(settings.get(), "GL_" #id, i); \} while (false)to this#define INTEGER(id) do { \GLint i = -1; \glGetIntegerv(GL_##id, &i); \if (ogl_SquelchError(GL_INVALID_ENUM)) \scriptInterface.SetProperty(settings.get(), "GL_" #id, errstr); \else \scriptInterface.SetProperty(settings.get(), "GL_" #id, i); \std::cout << #id << ":" << i << std::endl; \} while (false)Then when you start the game you'll have (in the console) MAX_TEXTURE_COORDS_ARB: ... (along with a lot of other info).I might be able to cram info to reduce the number of texture coords I use, but I'm afraid I won't be able to change that much. Edited July 7, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 I'll try that, but for now I got this from the command line:$ glxinfo -l | grep GL_MAX_TEXTURE_COORDS GL_MAX_TEXTURE_COORDS_ARB = 8 Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 7, 2012 Report Share Posted July 7, 2012 Mh. Then that shader shouldn't crash. What do you have for "MAX_TEXTURE_IMAGE_UNITS_ARB"?To debug, you might try changing that line to a lower number, such as "5". It will perhaps crash, but it should crash somewhere else. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 (edited) Mh. Then that shader shouldn't crash.As far as I can tell from the code, you are using an coordinate index of 8 on the line where it crashes. Wouldn't that exceed the limit by one because the arrays begins at index 0?What do you have for "MAX_TEXTURE_IMAGE_UNITS_ARB"?I get this from the command line:$ glxinfo -l | grep MAX_TEXTURE_IMAGE_UNITS_ARB GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 16 Edited July 7, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 7, 2012 Report Share Posted July 7, 2012 (edited) Isn't it 7? Looking here, it appears to be, so it shouldn't crash. Edited July 7, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 (edited) I swear I haven't touched that parameter. I'll have to try pulling again.Edit: Ah, I was one commit behind. Edited July 7, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 Okay, in your latest version I just get a segfault when trying to add the temple in Atlas:Segmentation fault (core dumped)Not sure what info would be useful for you. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 7, 2012 Report Share Posted July 7, 2012 Could you try first loading test.pmp and then adding the temple? I get the same crash, and I'm not sure what's causing it (I also get it in GLSL, so it should come from something else). Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 Will do. Currently recompiling, for good measure. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 7, 2012 Report Share Posted July 7, 2012 Could you try first loading test.pmpI don't think that file has been added to your commit. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.