-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some enhancements #630
Comments
Interesting. |
here you go :) i used SDL2 and other libraries from vcpkg for my build. |
ok after checking a few things i got SDL's cpu detection working. I forgot to add in a small codepiece from darkmods AVX detection which takes care of an improper _xgetbv intrinsic in gcc < 9.0 (only used if SDL is 1.2). mostly cosmetic also added a check for CPU type so that it now prints AMD or Intel instead of generic which it now only prints if forced or if detection fails (disables all cpu intrinsics). |
Thanks - do you have a git repo with the source? |
Been on hiatus for some years just decided i wanted to get some changes out that might benefit your port. Actually also managed to port grimms quest for the gatherers key as i have permission to use his game sources. |
There's no hurry, good luck with your teeth! :)
Cool, if you also have permission to release the source under GPL, that would be a great addition for the dhewm3 mods! |
That should be ok, as far as i understood him when i last talked with him the restriction was more towards the materials he created for the game (textures models etc) not so much the game code itself which is in large parts based on sikkmod. was actually rather nasty to get the code ported hehe :) |
heres the compiled mod dll for it if you want to try it out. |
Am I wrong or is this the required source code? I found it by downloading the mod on moddb
|
yep thats the source allright :) |
well i allready ported it so unless you want to try it yourself i could just upload mine ?. |
I'd prefer not to port it myself if the work is already done - the source would be welcome, even as a zip (in case of mod ports I don't care that much about commits) :) |
ok here you go :) |
doh forget to rename the folder before zipping it up... well as you can guess i used the sikkmod port as a base for the port. just rename it to grimm :) |
also fixed a lot of the warnings but a few remain so there is definatly room for improvement. mostly compiler complaining about unreachable code. |
thanks! :) |
last minute fix seems it did not compile for x64 works now. |
ah well the game starts but crashes to desktop when starting a map in x64 so definatly something fubar still. |
No worries - should I wait some more (days? weeks? don't matter, there's no hurry) or should I try to port the source myself? |
thanks now the grimm mod works, the only thing missing is dungeondoom and I think dhewm3 is compatible with all mods |
well it runs fine on x86 so must be me missing out on some pointer changes for x64. |
Ok, I'll look into it :) |
not a bug as such rather a missing function, my hybrid GLSL renderer chokes on the shader based gamma making things way to dark if enabled turns out that even though it is loaded as a material shader it also needs some some code for it in the GLSL interaction routine... so for now i disable shader based gamma if using the GLSL interaction renderer. i also added it to imgui and defaulting it to off for now. |
https://github.com/dhewm/dhewm3-sdk/tree/grimm works on 64bit Linux, didn't test Windows. Sorry, but you did something wrong when porting: All the GPL license headers were replaced with the SDK license headers - probably you just copied the Grimm source over the dhewm3 SDK? The best way to port a mod to dhewm3 is described here: https://github.com/dhewm/dhewm3-sdk#how-to-port-a-mod-to-dhewm3 |
Heh yeah as said you probably know the source better :) actually i went the other way around at first i hand edited all the grim source files picking includes as they were in the sikkmod port and looking for anything commented with -DG after that i did indeed copy them over x-D |
works in windows to, also the 64 bit version :) |
for those not in the know, shader gamma breaks certain sikkmod features like SSAO (well newer worked to well to begin with) but other parts also show some breakage to a lesser degree. these settings in my autoexec.cfg lets it look the best -> if you have a modern card it should be safe to set ultra. |
the changes for sse avx and avx2 plane culling from the darkmod. |
If you could create a pullrequest I could review the changes there, and comment directly on the corresponding lines |
when i get a fork set up :) was more to let you see some of the changes (some are rather large, the shadow code gets a pretty big rewrite for one). |
i could actually also add darkmods soft shadows if wanted (not shadowmaps this was added later and requires a lot more code) but im not sure if it will break any mod related soft shadow code like sikkmods which can be a little buggy at times (also pretty slow). |
AVX* changes added as pull request. |
ok i finally got it building on ubuntu (used the wsl version for testing). as im not fluent in git feel free to chime in with advise on how to use git gui (im using tortoisegit on windows not sure if that can also filter whitespace changes ?). also builds using mingw-w64 and clang on windows now. |
I'm not very familiar with tortoise git. Does it also install the "git bash" shell and the usual git tools? Or just its own thing? So I can select "Git GUI Here" to open git gui for the project of the current folder. If you don't have this, install it. Either from the link above, or, as suggested by the Tortoise Git Documentation from https://gitforwindows.org/ - in the end both lead to the same downloads. Git GUI overview
1 Unstaged ChangesThis is the list of files with Unstaged Changes. Those are changes that have been made but are not part of any commit (not even the one you're currently creating).
If you click one of those file icons in the Unstaged Changes list, all changes in the file will be staged (or in case of removed files, the fact that it's removed is staged, or for new files it gets added to git). You can also select multiple files from the list (as usual, with click+Ctrl or click+Shift) and then click the 2 Staged ChangesThis is the list of files with Staged Changes. Those are changes that will be part of the commit you're currently creating (unless you unstage them again).
If you click one of the file icons in the Staged Changes list, all changes in the file will be unstaged, which means it will just turn up in the "Unstaged Changes" list again. Again, you can select multiple files, click the 3 Diff ViewThe diff view shows the changes for the currently selected file. 4 Commit MessageThis allows you to write the commit message for the currently edited commit.
Diff View detailsYou can right-click in the diff view to get a context menu: This is how you can commit (actually: stage or unstage) just some changes. Of course (un)staging just a single line isn't always that much fun, so Git GUI also allows you to select multiple lines: So now you can (un)stage all selected lines at once. I hope this helps getting into Git GUI, and that it's clear now how to commit just relevant changes (scroll through the diff view and stage the hunks you want, or select the lines you want and stage them - or first stage the whole file and then use the diff view from the Staged Changes list to unstage changes you don't want in this. Both ways are valid and useful, depending on the situation). By the way, if you're done committing changes and have Unstaged Changes that you want to get rid of, you can select the file(s) in the Unstaged Changes list, click the If anything is unclear, please ask! |
(I should probably turn that into a blog post) |
thanks for the excellent explanation, tortoisegit is a little different and im not sure you can select fragments like in git gui. |
added the darkmods AVX and AVX2 simd instructions.
hybrid ARB2 / GLSL renderer the GLSL part only handles interactions eg. world and can be disabled completely without any bugs in case someone wants to use say sikkmods pom shader.
RAII based depthbounds testing code.
optimized VBO code -> originally from Michael Hiney (InsideQC).
Had some problems with SDL2's cpu feature detection so i added a modified version of Darkmods.
Problem being that SDL2's Cpu detection code does not seem to detect anything above SSE3 (i dont know much about SDL but the code i replaced also works with gcc/clang).
runs pretty fine here and i was asked by one of the TDM devs about a review.
the GLSL part is not strictly nessesary but add's a little for modders who prefer writing shaders for it.
the GLSL part does not handle shadows nor material / user shaders but it could easily be modded to handle shadows as well.
handling material / user shaders would be a good bit harder though.
here is a compiled version for windows for testing.
dhewm3_2.zip
The text was updated successfully, but these errors were encountered: