Page MenuHomeWildfire Games
Feed Advanced Search

Apr 5 2021

DanW58 added a comment to D3603: Water-Patch.

@nani and @gameboy Friends, I totally agree it's a pity to have done so much work on these shaders and let it all go to dust; but it's really pointless to try to continue with it, with all the hate I got, and the monkey-wrenching. The fact is my contributions are not wanted. Period. If you look at the comments on this patch, back to the beginning, note what I'm being asked for: separate patches for each feature... !!! Like, how much time was I supposed to spend on this? It would take me weeks of work to separate this into 3 separate shaders, individually debugged and diffed. It's insane.
Notice also how many thoughts, reports and ideas I presented here, about blurring, about shadows; and I got no reply. Silent treatment is what it is.
So, if my work is never going to be accepted, there's no point in continuing. I stopped the C++ work I was doing too, for the same reason.
And I also stopped looking at the wildfire engine for my own purposes, since I would probably not get any help with modding it.
And so I also stopped playing 0ad, for good measure.
Divorce.

Apr 5 2021, 9:52 PM

Apr 2 2021

nani awarded D3603: Water-Patch a Love token.
Apr 2 2021, 1:12 AM

Mar 2 2021

DanW58 added a comment to D3603: Water-Patch.

@vladislavbelov Sorry, never saw your comment until now. I'll see what I can do. The problem with shaders is that often the order that operations can be applied is not as originally envisioned. Case in point the dimming of sunlight entering the water is done at the end of the pipeline, which is neither here nor there since the order of multiplicands is invariant, but makes isolating concerns more difficult. Off the bat,

Mar 2 2021, 1:33 AM
DanW58 updated the diff for D3603: Water-Patch.

The water_high.fs shader was starting to slow framerate on my old videocard, so I looked for ways to optimize the code.
This first step is to move the sun-dimming factor for sunlight refracting into the water; namely the ndotl calculation, where n is 0,1,0, and the fresnel calculation for refraction. The product of fresnel refraction and ndotl is written to a varying called "sun_dimming_factor", such that water_high.fs now only has to compute Fresnel once.

Mar 2 2021, 1:16 AM

Mar 1 2021

DanW58 added a comment to D3603: Water-Patch.

I'm sorry; I thought that converting tabs to spaces was going to help, but it seems the original file had tabs. Should I convert double-spaces back to tabs? Let me know.
In the meantime, I have a suggestion without any preconceived idea who would be implementing it, if at all; of course my willingness is absolute.
The idea is to expand the water shader to include stuff that floats on water, such as water-lilies --as are found in Belgian Bog.
I think the engine could programmatically separate floaters and send them to the water shader as a separate texture.
The benefits of doing so are that the water shader could then,
a) rock the floaters as per the water waves' normal ((they look odd being still when the water is waving)), and
b) move them around slightly, by using texture offsets on the floaters texture, to represent wind.
The texture offsets could be related back to the numbers controlling trees' motions representing wind.

Mar 1 2021, 6:43 PM
DanW58 updated the diff for D3603: Water-Patch.

Improved the hack for wet-looks of coasts.
Fixed the refractive factors in and out of the water: Now sunlight penetration is modulated by fresnel refractive factor based on ndotl, while light from the sky is not modulated going in. Upon coming out of the water, light is modulated again by fresnel refractive factor based on ndotv.
Screenshots in this post:
https://wildfiregames.com/forum/topic/36330-a-psychic-shader-mod-development-begins/?do=findComment&comment=418383

Mar 1 2021, 5:50 AM
DanW58 updated the diff for D3603: Water-Patch.

Got rid of Schlick's Approximation and implemented true Fresnel from Wikipedia.
Obtained RGB refractive indexes for seawater and freshwater; presently sea-water is used.
Found another mistake: Refracted light was not multiplied by (1-reflection_factor); now it is.
Commented out my previous attempts to mix scalings and orientations of the wave animation; they were
causing the appearance of fine ripples, not sure why.
Made the wet coasts feature more subtle.
Fixed problems with there being tabs instead of spaces.
For screenshots, check this forum post:
https://wildfiregames.com/forum/topic/36330-a-psychic-shader-mod-development-begins/?do=findComment&comment=418372

Mar 1 2021, 2:51 AM

Feb 27 2021

DanW58 updated the diff for D3603: Water-Patch.

Solved the problem of reflections being too faint.
Solved a problem with artifacts on land; it yielded to a number changed in the Schlick approximation from 1.0 to 1.15.
Found another mistake: The refracted bottom had no incident lighting computed; it was essentially an emitter.
Added a hack to make coasts exhibit a darker band resembling wetness. It was at the cost of draining some of the water (lowering the level, optically).
Added crossing waves at 90 degrees with different scaling, to try to break or hide the tiled look of waves.
EDIT: Thanks, Gameboy; missed your comment.
For a screenshot, see this post:
https://wildfiregames.com/forum/topic/36330-a-psychic-shader-mod-development-begins/?do=findComment&comment=418155

Feb 27 2021, 11:00 AM

Feb 24 2021

DanW58 updated the summary of D3603: Water-Patch.
Feb 24 2021, 9:06 PM
DanW58 requested review of D3603: Water-Patch.
Feb 24 2021, 9:03 PM

Feb 18 2021

DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Moved declaration of half vector out of conditional compile switch in model_common.vs; also swizzled lines 133 to 137 to correct dependencies.

Feb 18 2021, 11:49 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Took the exporting of the half-vector out of any conditional switches in model_common.vs.

Feb 18 2021, 9:09 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Minor code optimization in model_common.fs; saved one sqrt() call.

Feb 18 2021, 1:24 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Change name of function "get_white_dimming_factor(tex)" to "get_needed_white_dimming_factor(tex)", in terrain_common.fs.
Fixed a few more comments not capitalized, or not ending with a period.

Feb 18 2021, 1:18 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Removed leftover code from attempting to use skybox as enviromap.

Feb 18 2021, 1:03 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

More cosmetic fixes.

Feb 18 2021, 12:52 PM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Carried on style fixes to the other shaders.

Feb 18 2021, 5:44 AM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Figured out how to diff from root while skipping /sources.

Feb 18 2021, 5:18 AM · Contributors
DanW58 updated the diff for D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..

Updated the patch again after fixing style 'mistakes' at Stan's request. What I was not able to do is diff from the root folder, as then svn diff wants to include all the stuff from sources, which amounts to more than two megabytes. I'm sure there must be a command to skip a folder, but I was a Tortoise user for many years; never learned the command line.

Feb 18 2021, 4:29 AM · Contributors

Feb 17 2021

DanW58 requested review of D3555: (1) AO factors = 1.0 for all materials, (2) skyward bias for ambient light in shaders; (3) temporary fix for excessively bright colors in terrain textures..
Feb 17 2021, 11:22 PM · Contributors

Jan 28 2021

DanW58 added a comment to D3454: Modified CFixedVector2D/3D that cache length to reduce calls to isqrt64(), plus a few other fixes.

Optimus, I didn't even know I could use svn inside subfolders. I used svn before, for two years, but
it was through a gui, and all I did was check out and commit.
So, I tried making a diff, but I forgot that my code's current state is far from compiling.
I'm turning all the vector classes (AND my point classes below them) into template classes, where the
template parameter is a "Frame of Reference" abstract type, so as to prevent, for example, subtracting a
screen-coordinate vector from a terrain point and interpreting the result as a mini-map coord. Mixing
frames of reference won't be allowed except through deliberate channels. Here's a sneak preview:

Jan 28 2021, 6:36 AM

Jan 23 2021

DanW58 updated the diff for D3454: Modified CFixedVector2D/3D that cache length to reduce calls to isqrt64(), plus a few other fixes.
  1. Removed comments.
  2. Fixed the tabs that were spaces issue, courtesy of CodeLite
  3. Added alignment directives
  4. Removed padding member
  5. svn diff'ed from the instructions in the wiki
Jan 23 2021, 1:26 PM
DanW58 updated the diff for D3454: Modified CFixedVector2D/3D that cache length to reduce calls to isqrt64(), plus a few other fixes.
Jan 23 2021, 8:32 AM
DanW58 requested review of D3454: Modified CFixedVector2D/3D that cache length to reduce calls to isqrt64(), plus a few other fixes.
Jan 23 2021, 8:17 AM