Jump to content

Post-processing effects test (SSAO/HDR/Bloom)


Recommended Posts

@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 by myconid
Link to comment
Share on other sites

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 by wraitii
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by wraitii
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 something

Otherwise it all looks fine, here's a small screenshot using my waterShader too:

post-9128-0-02959500-1341765663_thumb.jp

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

-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 something

More info??

Btw, water surfaces can now receive shadows.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...