nifa Posted February 28, 2021 Report Share Posted February 28, 2021 On 27/02/2021 at 7:50 AM, DanW58 said: If there's any problems, shader not compiling, whatever, please report it to this thread. You may need to turn all the graphics options to maximum; I haven't even tested it non-maxed-out. I get this error on the map "oceanside": This is with GLSL disabled: Did I do something wrong? Apart from that, thanks, everything else is looking really nice:) Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 28, 2021 Author Report Share Posted February 28, 2021 Thanks; I think I can fix that; give me half hour or so. 1 Quote Link to comment Share on other sites More sharing options...
nifa Posted February 28, 2021 Report Share Posted February 28, 2021 4 minutes ago, DanW58 said: Thanks; I think I can fix that; give me half hour or so. Nice, just found out that it's working with my other graphic card, but not with the onboard graphic, idk if that's helpful but then I get this with my the other with my external gpu: Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 28, 2021 Author Report Share Posted February 28, 2021 (edited) Alright, I don't understand the second problem; I'm not sure where that is or what I'm looking at. This water_high.fs should solve the first problem; I post it here while I work on making a new pyromod. water_high.fs Edited February 28, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 28, 2021 Report Share Posted February 28, 2021 12 minutes ago, nifa said: Nice, just found out that it's working with my other graphic card, but not with the onboard graphic, idk if that's helpful but then I get this with my the other with my external gpu: Intel driver bug very likely. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 28, 2021 Author Report Share Posted February 28, 2021 No, it's my bug. There's swizzling operators, in glsl, like for 2, 3, 4-component vectors, you can write A = B.rgba or A= B.xyzw or A = B.stpg, for color, dimension or texture coordinates respectively. They all mean the same thing, but you cannot mix them, by the strict rules of glsl language, thus A = B.rgzw is illegal, but not every vendor enforces the rule. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 28, 2021 Author Report Share Posted February 28, 2021 (edited) @nifa Okay, here's the metal shader set version 0.1.1: (fingers crossed) Unfortunately, I don't get the problem so I can't tell if it is solved until you tell me. The "out of memory" error is worrisome... Not sure what that's about. And the second problem I don't understand. metal_shader_set_v1.1.pyromod Edited February 28, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 28, 2021 Author Report Share Posted February 28, 2021 (edited) @nifa Sorry, when I said all graphics maxed out I wasn't thinking about FSAA and sharpening. I have sharpening disabled, and MSAA at (4x). (FSAA 16x may have been the cause of the out of memory) Edited February 28, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
nifa Posted February 28, 2021 Report Share Posted February 28, 2021 (edited) Thank you for your fast reply, the water is back:) but there now is quite a different between with and without GLSL, is that how it should be? Spoiler Spoiler Quote Sorry, when I said all graphics maxed out I wasn't thinking about FSAA and sharpening. I have sharpening disabled, and MSAA at (4x). (FSAA 16x may have been the cause of the out of memory) Yes, I think so too, especially in combination with high quality shadows Edited February 28, 2021 by nifa Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 1 hour ago, nifa said: Thank you for your fast reply, the water is back:) but there now is quite a different between with and without GLSL, is that how it should be? I have no idea what it looks like without glsl, and frankly ... I mean, the old OpenGL pipeline all it can do for water as far as I know is alpha-blend. Anyways, I just implemented the true Fresnel formula from Wikipedia, and got rid of Schlick's approximation, so it looks different yet again, but better. Now I have new bugs with my coastal wet look darkening hack; doesn't want to work anymore. I will post a new pyromod when I get it to work. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 (edited) DONE! The water shader now uses TRUE fresnel for reflection and refraction coefficients. This is the Fresnel formula from Wikipedia; no approximations; no hacks. And it works! Updated also the Phabricator water_patch: https://code.wildfiregames.com/D3603 metal_shader_set_v1.2.pyromod Edited March 1, 2021 by DanW58 1 1 Quote Link to comment Share on other sites More sharing options...
nani Posted March 1, 2021 Report Share Posted March 1, 2021 Did you also take look at how the refractions are calculated? Given that the fesenel effect has a connection with the snelius law it could be an opportunity have thta effect also physically correct (if they aren't already). Big kuddos on the results! Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 (edited) ROTFLMAO! That is EXACTLY what I just finished doing. I found that the original shader had no light computations onto the ocean bottom, or floor under the water. It is as if it was emissive. Needless to say the light was not modulated by the fresnel refraction factor. So I put that in, but then I forgot that on coming out of the water, there's another fresnel refraction factor to account for. I just added it. However, the two are not the same: One is calculated on the light vector angle to the water; the other is calculated on the view angle to the water. Right now I have the same fresnel refraction factor used twice. Have to fix that. And I also have an idea that might improve my wet coasts algorithm; a crazy idea, have to try it. So expect a version 1.3 by tomorrow morning. Edited March 1, 2021 by DanW58 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 1, 2021 Report Share Posted March 1, 2021 @DanW58 Good. Hope you can solve the problems you mentioned. Come on. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 Yep, solved already; just putting together the pyromod and screenshots. Did you get the previous version to work? Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 1, 2021 Report Share Posted March 1, 2021 Yes, I'm looking forward to your final version. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 Coming soon; next half hour; but the difference is very subtle. I notice because I know what to look for. Bottoms of water bodies were getting too much sunlight for sun positions close to the horizon. Water's fresnel reflectivity is high at shallow angles, and so sunlight should not be able to penetrate as much as it did. Now the amount of light the bottoms get is exactly right. I'll post soon; like 15 minutes. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 (edited) Version 1.3 is here. Fixes issues with Fresnel refraction factors with light going into the water, and with light coming out: e.g., when the Sun is low, very little sunlight should be able to enter the water, most of it reflecting back up instead; therefore bottoms of water bodies should darken faster than by mere ray-dot-normal. The light reflecting off the bottom and coming back out again is modulated by fresnel refraction, except in this case it is calculated by eye-view vector angle, rather than the Sun's angle. Particularly noticeable in the second picture below: The shadows of the floating leaves are not too dark. Why? Because sunlight is attenuated by Fresnel, and so most of the light the bottom gets, with the Sun so low near the horizon, is bluish light from the sky, rather. The wet coast hack looks a bit better now. Modulating water's specularity linearly over a couple of yards is a noticeable artifact, really. I now modulate water's index of refraction, instead, as I fade in bottom darkness. The way it works is it darkens the bottom early (as if we are walking towards the water), but water's reflectivity (and foam) fade in more slowly. If you have any problems with the mod, try maxing out settings like "number of shaders" and most graphics quality options, EXCEPT sharpening and MSAA. I keep MSAA at (4x); good enough for me. And be sure to report here. And if you have nice screenshots to share, don't hesitate. metal_shader_set_v1.3.pyromod Edited March 1, 2021 by DanW58 3 2 Quote Link to comment Share on other sites More sharing options...
badosu Posted March 1, 2021 Report Share Posted March 1, 2021 Looks incredible, great work! 2 Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 1, 2021 Report Share Posted March 1, 2021 Ah, really good, I believe you will do better! Let us wait. 1 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 (edited) @gameboy Maybe I will do better; but it's no reason to wait. Enjoy the present moment. I got disconnected from the Internet last night; something to do with an unpaid bill ... Unbelievable how obsessed with money most vendors are ... There may yet be a version 1.4; I'm not sure. I want to get rid of white skins. No, I'm not into white-bashing; I'm white myself; I mean completely white (or very nearly completely white) color in diffuse to try and represent human skin. Some civs have good looking skins, like Ptolemies for example; but many are so white they look like porcelain; like the blood has been sucked out of them. The problem is that my skin-detection hack is too encompassing, and lots of things detect as skin that shouldn't, including wheat fields, roofs and walls. So the problem is not fixing zombie skin; the problem is seeing zombies everywhere ... Edited March 1, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 1, 2021 Author Report Share Posted March 1, 2021 I made a little demo video, for the undecided ... The fish need alpha. 3 3 Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 1, 2021 Report Share Posted March 1, 2021 It will be wonderful. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted March 2, 2021 Author Report Share Posted March 2, 2021 (edited) I just checked the video stats in Youtube; 13 views so far; average view time 2 minutes and 3 seconds. That's less than half the video. So most people click away before getting to half of the video. I frankly don't understand this community. This is a waste of my time like no other. Edited March 2, 2021 by DanW58 1 Quote Link to comment Share on other sites More sharing options...
badosu Posted March 2, 2021 Report Share Posted March 2, 2021 If you gonna use that as your metric you gonna be disappointed :-) Be patient 1 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.