myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 (edited) @Myconid: I mean stretching the texture sampling (of the grass) in a perpendicular direction to the eyeDir... I'm not sure how to calculate that, but it could perhaps be done.Something like that may be possible, if we use the direction of the terrain normal. Don't know if it'll be any faster, but it may be worth experimenting with that.BTW... I still get the normal problem with this code:<snip>Both should work the same, but it appears "mat3" doesn't work properly on my computer.You could try skipping the mat3 function and just cut the 3x3 portion of the matrix manually. If this helps, this is definitely caused by a bug in your GLSL compiler.I can confirm the "bi" water sampling, but I've found it to look slightly weird as the two move at different speeds.To me, this looks really nice:vec3 ww = mix(texture2D(normalMap, gl_TexCoord[0].st).xzy, texture2D(normalMap, gl_TexCoord[0].st * 1.33).xzy, 0.5);n = normalize(ww - vec3(0.5, 0.5, 0.5));(based on the vanilla shader from master, though) Edited July 8, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 Okay, compiled "merged" branch. Unsurprisingly, it runs fine now. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 (edited) I'll check your code with my updated water shader... I'll see if anything works.Yeah, the mat3 thing is probably a bug in my compiler... But then it's probably widespread between all Apple computers (and as my MacBookAir seems to bug the same, I'm inclined to believe so. And the OGL driver's (and thus GLSL compilers) are Apple-made on every Apple machine, and I believe are the same.).I'll check if I can port your merged shader to ARB, but as I haven't found a way to pass "varying" variables, I have to rely on texCoord and I'm getting short of them. Edited July 8, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 Yeah, the mat3 thing is probably a bug in my compiler... Are you running the latest drivers? If it's really a bug (and it's a pretty huge bug, if it is), maybe it's been fixed. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 wraitii, it really looks like a compiler bug! Other people have reported similar problems. Suggested fix is to construct the matrix manually, i.e:mat3(matrix[0].xyz, matrix[1].xyz, matrix[2].xyz)where matrix would be the 4x4 instancing matrix. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 (edited) Well, unless you have a reason not too, I'd say it would be a good idea to put that in your code (I don't think it's much slower, and if it offers compatibility).I've seen this thread which seems to be the same issue.I haven't checked but I do not think there is any "newer" driver than the one in the latest system update, on Apple computers... I'm not running the latest on my iMac, but I'll update when 10.8 (mountain Lion) comes out in ~3 weeks Perhaps they'll at last support openGL 3. Edited July 8, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 I'll commit it if it helped you. Did it? Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 (edited) Yup, it fixed it.I'll refork from your merged branch and work from that. Edited July 8, 2012 by wraitii Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 Yup, it fixed it.Alright, done!When you get a chance, give the "merged" branch a try with GLSL on. Let me know if anything else doesn't work. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 Well I'll refork from your merged branch and try to reconvert everything from ARB (not re-starting from scratch, though). I'll let you know. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 You'll want to use 'git checkout -b' to branch anew, in case you wasn't aware. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 Well I'll refork from your merged branch and try to reconvert everything from ARB (not re-starting from scratch, though). I'll let you know.Sounds good!And listen to zoot's advice. Create a new branch from your ARB branch and then try "git merge" with my merged branch. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 Did it the "no-braincell" way and restarted clean. Thanks to a very neat tool from Apple to merge files, I'll get everything back up in no time. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 Okay, so I've committed (here still) my changes (merging them too) to yours. It should work properly, though I have not yet tried adding to ARB your stuff from smoothLOS or terrainmapping. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 The line-endings seem to have changed again. At some point you may want to look at doing something like this:In regards to the line ending issue, it maybe wise to keep a .gitattributes in the repository. Not only does mean each user no longer needs to individually setup git, but I've found it works more reliably too.simply * text=auto eol=crlf might be enough to get the job done. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 Should have kept the same... I must have messed that up. These files should not have changed anyway... I committed them by mistake. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 8, 2012 Report Share Posted July 8, 2012 Myconid, testing your merged branch (using GLSL):-I get a "LOS framebuffer object incomplete: 0x8CDD" error, and indeed LOS doesn't work in-game (all black).-I still have an issue with the AO uv, it seems not recognized or somethingOtherwise it all looks fine, here's a small screenshot using my waterShader too: Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 Also, on a sidenote, if smoothlos is enabled and the shaders have been deleted, the game segfaults. Not really surprising, but you may want to handle that like I believe it is for the water shader, namely by printing an error message and defaulting to the old non-shader implementation. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 -I get a "LOS framebuffer object incomplete: 0x8CDD" error, and indeed LOS doesn't work in-game (all black).Fixed.-I still have an issue with the AO uv, it seems not recognized or somethingMore info??Btw, water surfaces can now receive shadows. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 The game segfaults when I start a match on the map "Migration" in the latest commit on 'merged'. It does not happen on any other maps I have tried so far, including Punjab 3 and Tropical Island. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 The game segfaults when I start a match on the map "Migration" in the latest commit on 'merged'. It does not happen on any other maps I have tried so far, including Punjab 3 and Tropical Island.No problems here. I hope you remembered to recompile? Any change if you turn off smoothlos in the config? What about turning off fancywater? Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 8, 2012 Report Share Posted July 8, 2012 Oh god, the wait is unbelievable. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 Any change if you turn off smoothlos in the config? What about turning off fancywater?I still happens when preferglsl, smoothlos and fancywater are set to false.I've tried to narrow the commit range a bit:It does not crash on 9f80921728f89c15673b89575cd92a1fa0338470.It does not crash on 8d0e60543966812eb86525eb5c8fe907bc77cce5.It does crash on 3b56fb334a08f89d7c878e46b4ea1ee8e5c0e90e.So presumably it is something in the 'biwater' implementation. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 8, 2012 Report Share Posted July 8, 2012 It says "Segmentation fault (core dumped)". Can I get any useful info out of this core? Quote Link to comment Share on other sites More sharing options...
myconid Posted July 8, 2012 Author Report Share Posted July 8, 2012 It says "Segmentation fault (core dumped)". Can I get any useful info out of this core?You could try playing with gdb, I guess. See if you can find a tutorial. 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.