Jump to content


Photo

TDM Engine Development Page

idtech4 development engine

  • Please log in to reply
1089 replies to this topic

#826 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1906 posts

Posted 15 August 2018 - 02:20 PM

Yup, that's exactly how it looks like.



#827 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 02:21 PM

tested with FBO off, its better but still has some bugs like mirror effect on some portals, with FBO on its a mess :(

This might take a while to fix, cause i have to find out what causes this much discrepancy between the two.



#828 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 02:49 PM

hmm GL_TEXTURE_COORD_ARRAY gets turned off a lot of places in the debug tools but its newer set anywhere,

i commented out all instances of it and the debug functions work the same without it, sadly by work i mean not so well :/

 

With FBO on its completely broken, and some rendering functions which where loaded internally before have been moved to shaders, so might no longer work exactly the same way anymore.



#829 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2074 posts

Posted 15 August 2018 - 02:58 PM

hmm GL_TEXTURE_COORD_ARRAY gets turned off a lot of places in the debug tools but its newer set anywhere,

i commented out all instances of it and the debug functions work the same without it, sadly by work i mean not so well :/

 

With FBO on its completely broken, and some rendering functions which where loaded internally before have been moved to shaders, so might no longer work exactly the same way anymore.

That needs to be replaced with qglDisableVertexAttribArray( 8 ) but I don't think it's related to invalid geometry.
 



#830 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 03:50 PM

Indeed, it seems to be related to portals and fogshaders, as an experiment i tried to run the portal debug tool and whenever i hit a fog leaf portals would dissapear Oo so ouch.

Im not sure why it there does not seem to be any problems outside the debug render tools though.



#831 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2074 posts

Posted 15 August 2018 - 04:00 PM

Indeed, it seems to be related to portals and fogshaders, as an experiment i tried to run the portal debug tool and whenever i hit a fog leaf portals would dissapear Oo so ouch.

Im not sure why it there does not seem to be any problems outside the debug render tools though.

How do I repeat it? I don't see this problem in e.g. Old Habits 2.



#832 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 04:08 PM

try enabling r_showportals together with r_showtris, it works then but why.



#833 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 04:10 PM

 

How do I repeat it? I don't see this problem in e.g. Old Habits 2.

 

Might not show up in the same spot in all maps, try running the gatehouse you will get the problem with r_showtris on just after entering the gate over the drawbridge.



#834 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 05:08 PM

Ok it works fine besides a little flickering in the portal outlines when crossing a fogleaf when r_showportals are on, tbh im a bit baffled by this.



#835 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 05:34 PM

Spoke to soon it seems.

 

14w8vpd.jpg

 

With FBO on it still causes a mess :S

 

2dr6fqr.jpg

 

the tri outlines dissapear at certain angles with showportals on and FBO.

 

Without FBO and showportals the outlines are drawn as inverted mirrors when i hit these angles, sadly i cannot get it to show these on screenshots.

 

It only seems to crop up whenever there are two or more portals close together or intersecting each other.


  • Anderson likes this

#836 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 15 August 2018 - 07:01 PM

Oh hell, ok FBO works also if set before entering the game or after doing a vid_restart, but only if showportals are on.

Do we need another toggle for FBO states ?.

 

Im having a nasty feeling this bug is caused by a broken state change somewhere.



#837 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2074 posts

Posted 16 August 2018 - 12:45 AM

Sorry, I still can't see it.

I started the Gate house and passed a couple of doors and it just works for me.



#838 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1906 posts

Posted 16 August 2018 - 12:59 AM

When you walk to a portal and you don't see the glitches, try going through it and seeing it from the other side. Edit: using r_showportals does seem to resolve the mirror and rainbow glitches effect though.


Edited by Judith, 16 August 2018 - 01:11 AM.


#839 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 05:56 AM

Strange if it only affects some of us ?, but it does not seem to be limited to nvidia cause i use an AMD R9 390 and i get it to.

do you use an intel card duzenko ?



#840 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1906 posts

Posted 16 August 2018 - 06:05 AM

I think I've found the culprit. Try toggling Postprocessing on and off while looking around with showtris. When you turn postprocessing off, the mirrors and rainbows go away too.


  • Anderson and revelator like this

#841 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 08:33 AM

Great :) might be a conflict in the post process code screwing up then.

The reason i was apprehensive about why showportals also seems to fix this is that it uses a totally different rendering chain (intermediate vs VBO), so it should actually cause more problems not less.



#842 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 08:45 AM

	if ( !w || !h // this has actually happened
		// nbohr1more add checks for render tools
		|| r_showLightCount.GetBool()
		|| r_showShadows.GetBool()
		|| r_showVertexColor.GetBool()
		|| r_showShadowCount.GetBool()
		|| r_showTris.GetBool() // revelator: need this one as well, screws up showtris as pointed out by judith.
		|| r_showTexturePolarity.GetBool()
		|| r_showTangentSpace.GetBool()
		|| r_showDepth.GetBool() ) {
		return;
	}

Ok now were cooking with gas :)



#843 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 08:49 AM

I suspect its the depthtest from the bloom code that interferes badly with the showtris code.

But we dont need bloom or other fancies when using those tools, so turning these parts off should fix a good deal of the problems.


  • nbohr1more likes this

#844 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 08:53 AM

Added the code above and it fixed it completely :) nice find judith.


  • Judith likes this

#845 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9428 posts

Posted 16 August 2018 - 08:53 AM

Yeah, I was trying to be conservative and only disable bloom where I absolutely knew it broke things.


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#846 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 09:13 AM

All changes upped, it should be in the next build.



#847 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 09:15 AM

No problem m8, i should have expected that this was what caused it since most postprocessing adds another layer to the renderer.



#848 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 09:18 AM

Btw. i moved the postprocessing code into tr_backend.cpp since it was only called from there.

Unless you plan on using it outside the backend commands i could remove the typedefs for it completely and save us some space, but i wanted to hear your plans first.



#849 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9428 posts

Posted 16 August 2018 - 09:43 AM

I'll let Duzenko chime in there.

 

As I recall, there was this strange stub function on the game side for activating the cvar which is why

I was having a little trouble with some of the fix mechanisms for initialization operations like reloadImages.

 

In my mind r_postprocess shouldn't be doing anything on the game side and should work like all other render cvars.

 

I guess the some of this game side design stems from the use of r_postprocess with effects like influence vision (scripts)

for when the player is cursed, etc. They wanted modders to have more SDK access to these effects

so they moved some rendering control to the game side but it really doesn't belong there in Doom 3 GPL branches.


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#850 revelator

revelator

    Advanced Member

  • Development Role
  • PipPipPip
  • 574 posts

Posted 16 August 2018 - 09:59 AM

Ah yeah, i was wondering about that, but the mappers might probably dissagree if we move it to a place where they do not have access in case they want it for some special effect ?.

Well looks like we need to live with this sort of hacking about then,

it's not overly intrusive now so ill leave a comment about it so that further changes to postprocessing code also warns about the posibility of breakage in other parts of the chain.

 

I also added r_showportals to the check and made a small utility function to turn off postprocessing in case we use the render tools.

/*
=============
RB_CheckTools

Check for any rendertool and mark it
because it might potentially break with post processing.
=============
*/
static bool RB_CheckTools( int width, int height ) {
	// this has actually happened
	if ( !width || height ) {
		return true;
	}
	// nbohr1more add checks for render tools
	// revelator: added some more 
	if ( r_showLightCount.GetBool() || 
		r_showShadows.GetBool()	|| 
		r_showVertexColor.GetBool() || 
		r_showShadowCount.GetBool()	|| 
		r_showTris.GetBool() ||
		r_showPortals.GetBool() || 
		r_showTexturePolarity.GetBool()	|| 
		r_showTangentSpace.GetBool() || 
		r_showDepth.GetBool() ) {
		return true;
	}
	return false;
}

which is then called in the bloom code like this

	// revelator: added small function to take care of nono's
	if ( RB_CheckTools( w, h ) ) {
		return;
	}

atm its a static function but it could be made global in case that is ever needed.







Also tagged with one or more of these keywords: idtech4, development, engine

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users