-
Posts
1529 -
Joined
-
Last visited
-
Days Won
26
Posts posted by revelator
-
-
no sense in that atleast, though its interresting with the load times
.
Do you plan on an approach like fhdoom's when changing to gl3/4 ?, i noticed he changed most of the renderer to class based.
-
Rewriting the entire renderer with classes might be next step, but it will be a big ammount of work.
The goal for me was simplifying the code a bit, i did not expect any gains speedwise at all, but strangely that was what i got. Need to investigate that one.
Reducing the state changes would have been a more likely candidate for a speedup, but that part was not even in when i tested it the first time around.
-
Hence why it was not uploaded to svn but only exist in a local copy.
If you want to try it i can provide an executable, then we can discuss if it is worth it or not.
-
A few other things i been toying with.
Reduced number of state changes in the arb and glsl render backends.
Sys_Miliseconds replaced by a high resolution version.
-
So the AA problems have been fixed ?, ok thats nice
Tested my version of the class based FBO code, it works just like the unmodified version, no visible change besides faster loading.
I made some of the functions private because they are not used outside the FBO code.
I also moved the static initializers to a constructor but kept the destructor as a seperate function for now.
So far i tried 10 maps with different shadow options and i see no visible difference, from the unmodified one.
I dont mind posting a test executable you can try if you want.
-
I made an experiment and converted the fbo code to C++ classes.
I have not upped this experiment to svn so no worries i wanted to discuss it first.
Theres a good reason why we might want this, for one automatic constructors / destructors, and we could simplify the code a good deal.
Speedwise i had not anticipated any gain but strangely enough it actually loads faster now, go figure...
I can upload the changed code somewhere if you want to toy with it before deciding.
-
FXAA can be used from the old ARB shaders also, so that would not be a problem.
Speedwise its not noticable atleast for me with sikkmod, but less capable gfx cards might take a bigger hit.
seems AA and FBO does not play super well together from what i can gather around the net, though it should be possible to fix it.
All comes down to the ammount of code needed to get there
-
Btw since we have some problems with AA and FBO's this might prove interresting https://stackoverflow.com/questions/24072447/cannot-render-to-texture-with-multisampling#24072591
fhDoom uses a similar approach so it should also work for us.
-
Hmm strange that the bugged models only seem to affect one type of model
kinda looks like a failed depthhack gets applied, weird though this is the only mod where i noticed this behaviour.
if looking up the undead revenants get there heads cut off
and while that might look funny im certain that was not the intention.
Strangely the ghost models in the same place are not affected.
-
1
-
-
Oh had not noticed, ok then this is moot.
-
/* ================ Sys_SetHighDPIMode code that tells windows we're High DPI aware so it doesn't scale our windows ================ */ typedef enum D3_PROCESS_DPI_AWARENESS { D3_PROCESS_DPI_UNAWARE = 0, D3_PROCESS_SYSTEM_DPI_AWARE = 1, D3_PROCESS_PER_MONITOR_DPI_AWARE = 2 } YD3_PROCESS_DPI_AWARENESS; static void Sys_SetHighDPIMode( void ) { /* For Vista, Win7 and Win8 */ BOOL( WINAPI * SetProcessDPIAware )( void ) = NULL; /* Win8.1 and later */ HRESULT( WINAPI * SetProcessDpiAwareness )( D3_PROCESS_DPI_AWARENESS dpiAwareness ) = NULL; HINSTANCE userDLL = LoadLibrary( "USER32.DLL" ); if ( userDLL ) { SetProcessDPIAware = ( BOOL( WINAPI * )( void ) ) GetProcAddress( userDLL, "SetProcessDPIAware" ); } HINSTANCE shcoreDLL = LoadLibrary( "SHCORE.DLL" ); if ( shcoreDLL ) { SetProcessDpiAwareness = ( HRESULT( WINAPI * )( YD3_PROCESS_DPI_AWARENESS ) ) GetProcAddress( shcoreDLL, "SetProcessDpiAwareness" ); } if ( SetProcessDpiAwareness ) { SetProcessDpiAwareness( D3_PROCESS_PER_MONITOR_DPI_AWARE ); } else if ( SetProcessDPIAware ) { SetProcessDPIAware(); } }
Btw found this in a recent dhewm3 commit, might be of use to us also ?, it tells windows to avoid applying scaling on high dpi panels.
call in WinMain just before Sys_SetPhysicalWorkMemory.
-
1
-
-
Hmm spoke to soon, this seems to be a bug in the map i was playing, it also does it without preventing passing negative values to either scissorRect or viewRect (alberics curse).
-
1
-
-
Hmm interresting effect if we prevent negative width and height from entering scissorRect it works but if doing the same for viewport some models get there parts cut off, undead revenants for one looses half their head lol.
-
Well that was fast Oo, first map i ran triggered it (crucible of omens) just after exiting the room you start in.
-
Hopefully there should be none, so it will be quite a chase to get one if that is the case
,
i guess one way of going about that would be to insert an assert checking for negative scissorRect and then running the debug executable to see where it happened ?.
-
Had to ask because id did not check for it originally, but better safe than sorry.
-
Ok then, should i make the nessesary changes ?
-
The idea with avoiding negative values in scissor atleast was not totally far fetched, fhdoom does something similar, but i also went a bit overboard on that one cause i assumed no value there could be negative.
but as i found out x and y can actually be negative, but width and height must not be.
Question would then be should we care ? because if that happens we would allready have other problems down the line.
-
works with both values here, but i need to do a vid_restart after changing r_shadows.
-
Ok done.
And that multilight idea sounds pretty good
fillrate could indeed use some help.
-
No worries
im just a bit old school, eg. not used to working in a multi dev environment, and i understand those gripes completely.
And aye the SS bug had nothing to do with that as i found out after your update, ill revert the commit in a minute.
-
And it was not my intention to make your lifes harder, just with the initial problems with code that went poof, formatting problems and me trying to revert everything back,
i probably ended up changing more than was nessesary.
Appologies for that, guess with me being away for so long i had a hard time catching up to all the changes.
-
It was an attempt to fix softshadows because i misunderstood your intention with r_softshadowsquality,
i had the impression that the negative values mentioned might have been accidentally fed to the scissor and or viewport,
so i made sure that this could not happen. Then you fixed it yourself and i noticed i was on the wrong track.
The explicit variable initialization started as an attempt at getting rid of the ? vid_restart if mapping failed, guess i went a little overboard on that one sorry.
multi-light ? sounds interresting, what is the effect ?.
-
TDM Engine Development Page
in The Dark Mod
Posted
Changes with no use would be counter productive i agree on that
the goal was not so much speeding anything up, but rather to compartialize the code making it easier for other devs with no previous history coding in C to just jump in and make fixes. Im sorry if im not allways clear, english is not my main language.
What i wanted to achive was something similar to cabalistics plans for gl3/4, i just started in the framebuffer code because it was allmost pure C, but eventually i want to make the entire renderer class based like he would.
So it seems we had the same idea, i just came in a bit to late. But when the time comes then i would not mind in helping getting it together
.
So what are the most WIP problems atm ?, please nothing in regards to shaders, im not profient enough with those yet.