Unvanquished Development activity

Events from:

Daemon Engine
Daemon Engine
Thursday, 21 March 2019
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 21, 2019

Just to say that I have some other changes in local branches that become really hard to rebase each one I edit this PR and/or #184, so I hope this …

Daemon Engine
Daemon Engine
Wednesday, 20 March 2019
@illwieckz
illwieckz opened a pull request in DaemonEngine/Daemon Mar 20, 2019
numberize glsl dump output, count lines properly #185

first commit is prepending line numbers to glsl shader dump second commit is properly reinitializing line count after the the loading of a glsl li…

+42 -7
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 20, 2019

Note that I don't like this code at all and I would prefer to see the lightmap blending being done in the diffuse collapsed stage instead.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 20, 2019

So I added test for custom lightmap and then makes light stage and glow stage standalone and ordered after collapsed diffuse stage. Since most of t…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 20, 2019

It looks like the default lightmap stage is: { map $lightmap rgbGen identity tcGen lightmap blendfunc filter } For some reason the default rgbGen is

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 20, 2019

I have to figure out if there is more than one way to blend lightmap. Perhaps not, perhaps all the rare variations I see are just mistake or equiva…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 20, 2019

I added the warning. I also reduced the light stage merge to just a disablement (there is already an implicit one within diffuse stage), the proble…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 20, 2019

Oh right, that slipped in with a fixup, I extracted it to its own commit.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 20, 2019

Oh, you're right, I'm dumb. Fixed.

Daemon Engine
Daemon Engine
Tuesday, 19 March 2019
@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 19, 2019

It was confusing since the commit was labeled "refactoring" and all other parts moved stuff around without behavioral changes.

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 19, 2019

No, continue or break applies to the innermost loop. In this case that's the for ( int i = 0; i < 3; i++ ) for the normal directions, which are all…

Daemon Engine
Daemon Engine
Monday, 18 March 2019
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

The z component is the vector that goes toward the viewer, that may increase the perceived depth and contrast the shadows. That may be useful as a …

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

The miss of that “one minus” was the cause of the reverted parallax (and maybe wrong offset). That is the proper fix.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

That's because parallax digs hole into the texture from the top and top is 1.0: 1 ____ 1-0 ____ | \ / | \ / .5| \____/ 1-.5 | | 0| The height the…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

break would stop right there the parsing of the material, hence disabling it entirely. This would not be a warning but an error, and such syntax is…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

In fact I copy pasted this line, there is 51 of them in that file. I fixed it (will push) but I may fix the 51 others in a bikeshedding commit in t…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

you're right, and I'm especially the kind of guy that likes explicit correct comparisons, I'll do that :-)

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

Why is the 'one minus' introduced?

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

Since token[0] is a char it would be nicer to do !token[0] or token[0] == '\0' instead of comparing to an int.

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

I think you want break here.

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

Let's just delete this r_NormalScale stuff. The code does not make sense: (1) Why would you want to multiply just one component of the vector by so…

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#183 Mar 18, 2019

Fixed in PR that was breaking it.

@illwieckz
illwieckz closed an issue in DaemonEngine/Daemon Mar 18, 2019
normalmap compressed with `crunch -dxn` are loaded with reverted B channel #183

This bug was uncovered in #180. All our normal maps are compressed with crunch -dxn and our engine loads them with reverted blue channel (Z compone…

5 comments
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

I also fixed the compilation of the liquid related code so it builds if enabled. By the way I left it disabled and produces visual garbage in any way.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

I restored the Capcom code to abuse DXT1/5 alpha channel to compress normal maps and I passed the heightMapInNormalMap boolean to glsl so the engin…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

copy pasted from our code, this is a refactor, some of the normal code in other files had this.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

It's not a good idea at all. All Unvanquished maps use the other format. I fixed it.

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

So why is it a good idea to remove support of all the formats other than the "uncompressed RGB" one? Did you find that no assets use any of them?

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

I don't think it does. If you don't know, where are you getting the code from?

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

more code is required to get it working properly in every case, this line: vec3 N = texture2D(u_NormalMap, texNormal.st).xyw; means that normalmap…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

the normalize one? I really don't know

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

That's doable, the original code was already looking for only one kind of these stage and ignore others once first was found.

@slipher
slipher commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

Can we get a warning if the shader contains more than one of any of these kinds of stage?

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

Also one note: the heightmap in normalMap stage must be applied on both diffuse, specular and glow maps, there is no such things as ordering in tha…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

note that this is still ordered: the existing stages that are not collapsed together are still before/after the collapsed one. The question is: doe…

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

If some of the code makes everything totally broken it should be pushed to a branch other than master.

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

I guess this commit should be removed now that Fuma has explained why things are extra magical?

@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 18, 2019

does this line have any effect?

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

You put the feet on it. Basically, the initial quake3 material stages were order dependent. And there was no thing like a glow map, you just write …

@slipher
slipher pushed to DaemonEngine/Daemon Mar 18, 2019
2 commits to master
@slipher
slipher merged a pull request in DaemonEngine/Daemon Mar 18, 2019
+131 -10
13 comments
@slipher
slipher commented on pull request DaemonEngine/Daemon#184 Mar 18, 2019

You're confident that shader stages should never have any order dependency and can be arbitrarily shuffled? The old version only merges adjacent st…

Daemon Engine
Daemon Engine
Sunday, 17 March 2019
@illwieckz
illwieckz pushed to DaemonEngine/Daemon Mar 17, 2019
1 commit to master
  • @illwieckz 645c1bd
    ParseStage: do not overwrite alpha channel with rgbGen const, fix #120
@illwieckz
illwieckz closed an issue in DaemonEngine/Daemon Mar 17, 2019
broken water translucency on station15 map #120

See the waterfall and the pond (two different shaders): Note there is also a problem with depth: This is a third and similarly broken transluce…

3 comments
@illwieckz
illwieckz merged a pull request in DaemonEngine/Daemon Mar 17, 2019
ParseStage: do not overwrite alpha channel with rgbGen const, fix #120 #181

I hope that it does the same thing the ColorAdaptor line did but without modifying alpha channel: Daemon/src/common/Color.h Lines 126 to 128 in

+3 -1
2 comments
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 17, 2019

@slipher I noticed that you like to rebase and merge the fast forward way, so I let you merge this one.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#181 Mar 17, 2019

Fixed, and yes now that I see it I recognize what I was used to: Thanks for the review.

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#183 Mar 17, 2019

Note that just for knowledge about the alpha channel DXT trick, I noticed that an heightmap in alpha channel of a PNG file with a pure blank RGB st…

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#183 Mar 17, 2019

Thanks @fuma for that awesome piece of knowledge! And thanks to be there :D. I guess it also explains why normal maps compressed with crunch -dxn g…

@cmf028
cmf028 commented on issue DaemonEngine/Daemon#183 Mar 17, 2019

The current code for reading normal maps comes from here: https://therealdblack.wordpress.com/2010/06/26/texture-tools-and-normal-maps/ It referenc…

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#183 Mar 17, 2019

Is it related to DaemonEngine/crunch@902f075 ? This crunch commit talks about things “that breajs reconstruction of the z part in DXN compressed no…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 17, 2019

Great, I tested broken link on shader file, it's correctly handled: Debug: ...loading 'scripts/map_erbium.shader' Warn: [FS] Symlink points to none…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 17, 2019

I used this code to look for recursive symlinks. resolve() { t="$(readlink "${1}")" d="$(dirname "${1}")" ( cd "${d}" if [ -h "${t}" ] then printf '

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 17, 2019

note that second commit, the one named “glsl/normal: fix code to compute normal in tangent space with simpler code” is the one that makes dæmon una…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 17, 2019

I had no idea to name this, Xonotic use some OpenGL-like skyboxes without _ separator. I may name it “OpenGL” too.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 17, 2019

I reduced the number of commits to 10 by: reordering and squashing commits merging one that is very trivial: 178bb54 moving stage collapse commits…

@illwieckz
illwieckz opened a pull request in DaemonEngine/Daemon Mar 17, 2019
tr_shader: revamp the stage collapse code #184

improve readability reduce cpu complexity make it extendable fix bug when surface with reflectionmap is not normalmapped fix lightmap being applie…

+126 -190
@illwieckz
illwieckz pushed to DaemonEngine/Daemon Mar 17, 2019
1 commit to master
  • @illwieckz 178bb54
    tr_shader: add support for _luma dpMaterial (alternative to _glow)
@slipher
slipher commented on pull request DaemonEngine/Daemon#180 Mar 17, 2019

It's too hard to review 27 commits. Can you split this up into multiple PRs?

@slipher
slipher commented on pull request DaemonEngine/Daemon#181 Mar 17, 2019

Should you be multiplying by 255? Because that's what was done before the change which started to overwrite the alpha channel. 663a8a7#diff-1bbae73…

@illwieckz
illwieckz opened an issue in DaemonEngine/Daemon Mar 17, 2019
normalmap compressed with `crunch -dxtn` are loaded with reverted B channel #183

This bug was uncovered in #180. All our normal maps are compressed with crunch -dxtn and our engine loads them with reverted blue channel (Z compon…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 17, 2019

OK, people must know about the fact that ALL Unvanquished maps are broken with this branch because I fixed a bug that hidden another. Basically, al…

Daemon Engine
Daemon Engine
Saturday, 16 March 2019
@slipher
slipher commented on pull request DaemonEngine/Daemon#182 Mar 16, 2019

OTOH it's not really more complex to implement arbitrary depth, so it's probably not worth checking.

@slipher
slipher commented on pull request DaemonEngine/Daemon#182 Mar 16, 2019

I addressed the comments. Also by a depth 2 symlink I mean a symlink that points to a symlink that finally points to an honest file. Are there any …

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 16, 2019

So, more awesome stuff: Reflection maps are now loaded as cubemap (that was a bug), a new kind of cubemap naming scheme is added (for compatibility…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 16, 2019

#182 looks better so I'm closing this one.

@illwieckz
illwieckz closed a pull request in DaemonEngine/Daemon Mar 16, 2019
FileSystem: implement symlink support in zip archives, fix #83 #176

original C++ and BSD zip symlink resolver only load zip symlink from the same pak optional fs_pakSymlink cvar to enable the feature (disabled by d…

+201 -19
13 comments
Daemon Engine
Daemon Engine
Friday, 15 March 2019
@DolceTriade
DolceTriade commented on pull request DaemonEngine/Daemon#180 Mar 15, 2019

Very cool! @gimhael if you get a chance, could you review?

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

The trailing dot in fs_legacypaks description string was a mistake of mine, the common usage is to not add trailing dot to cvar descriptions. Can y…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

This would please me a lot: diff --git a/src/common/FileSystem.cpp b/src/common/FileSystem.cpp index f88c31ee5..85fd981a6 100644 --- a/src/common/F…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

this entirely aborts map loading, that must not

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

WAIT, the file system error code just make the loading a map fail entirely if a symlink fails to resolve.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

I confirm this work. Thanks to in-pak symlink compatibility layer I was able to simplify and make configurable normal map code, fix parallax one, a…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

@slipher, that looks good to me, why not printing a message (at least a debug one) on each resolved symlink (with original path and final one, it's…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

OK, given each pk3 is extracted as a pk3dir, this code list all cross-pk3 symlinks: for p in *.pk3dir do ( cd "${p}" find . -type l \ | while read l

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

So, there is no absolute symlink at all, all the symlink that have a / in their target name without having any leading ../ prefix are relative to dds/

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

Also, some are absolute symlink (but they don't have leading / as expected in q3 vfs), for example: dds/wakazachi_reflect.dds -> textures/wakazachi…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

Xonotic 20170401 has 439 first-level (../) symlink and, second-level (../../) symlinks and no third-level (../../../) symlinks.

@louy2
louy2 forked louy2/crunch from DaemonEngine/crunch Mar 15, 2019

Advanced DXTc texture compression and transcoding library with Unity improvements

C++ 5 Updated Mar 15

@slipher
slipher commented on pull request DaemonEngine/Daemon#176 Mar 15, 2019

Alternative implementation: #182

@slipher
slipher commented on issue DaemonEngine/Daemon#122 Mar 15, 2019

Max size of string literals on msvc is 65535 bytes Well if only TIMOTHY LOTTES hadn't written so many comments in fxaa3_11_fp we'd be golden 😛

@slipher
slipher commented on pull request DaemonEngine/Daemon#182 Mar 15, 2019

Also I'm thinking it was silly to support arbitrary-depth symlinks. Probably better to make the cvar a bool and not support depths greater than 1 (…

@slipher
slipher opened a pull request in DaemonEngine/Daemon Mar 15, 2019
@cmf028
cmf028 commented on issue DaemonEngine/Daemon#122 Mar 15, 2019

Max size of string literals on msvc is 65535 bytes, so using a raw string literal isn't an option. include-bin is just a program that gives the sam…

Daemon Engine
Daemon Engine
Wednesday, 13 March 2019
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 13, 2019

I discovered that our original code was not applying parallax offset to glowmaps, this is now fixed. Before: After: Note tat the displayed textur…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 13, 2019

I added a commit that implements dpoffsetmapping. This is a very useful keyword allowing to scale and offset an heightmap on a per shader basis. Se…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#180 Mar 13, 2019

I also refactored parallax code and fixed orientation the way it seems right to do (transforming [1-0] into [0-1] at the pixel level).

Daemon Engine
Daemon Engine
Tuesday, 12 March 2019
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 12, 2019

I added extra comments to explain how it works.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 12, 2019

this was entirely rewritten

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 12, 2019

this was entirely rewritten

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 12, 2019

findMap references a file that matches the path in another pak if the file is only available in the other pak (or take precedence with DEPS), so ac…

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 12, 2019

I tried to do the symlink stuff within the zipFile class, then after a lot of trouble I just thought it was a bad idea from the start. What makes m…

Daemon Engine
Daemon Engine
Monday, 11 March 2019
@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 11, 2019

But I'm very concerned by the addition of a GPLv2 code into a BSD one (the symlink resolver). That's enough to me to ask for a rewrite.

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#176 Mar 11, 2019

So, to sum up some talks. My first motivation into this and into any Darkplaces compatibility layer is to use Xonotic maps as test bed for Dæmon, g…

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#30 Mar 11, 2019

Just for reference, Xonotic default parallax depth scale is 0.02, our engine set it to 0.03 but we never used it so we are not tied to it.

@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#120 Mar 11, 2019

It looks like we have a fix in #181:

@illwieckz
illwieckz commented on pull request DaemonEngine/Daemon#160 Mar 11, 2019

Ah ok now I understand.

Daemon Engine
Daemon Engine
Sunday, 10 March 2019
@slipher
slipher commented on pull request DaemonEngine/Daemon#160 Mar 10, 2019

It only counts files that were opened with FS_FOpenFileRead. The engine has other file APIs that don't go through this function, so the results are…

@illwieckz
illwieckz opened a pull request in DaemonEngine/Daemon Mar 10, 2019
tr_shader.cpp: do not overwrite alpha channel with rgbGen const, fix #120 #181

I hope that it does the same thing the first of those lines does (without touching alpha channel): Daemon/src/common/Color.h Lines 126 to 128 in

+3 -1
@illwieckz
illwieckz commented on issue DaemonEngine/Daemon#120 Mar 10, 2019

Here is one example of buggy material: // Crappy water with leaves textures/station15_custom/water2 { qer_editorImage textures/station15_custom_src…