For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Questions, Tips&Tricks for the special patches
sn260591
OldUnreal Member
Posts: 116
Joined: Wed Aug 17, 2011 2:54 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by sn260591 »

1) I receive too bright screen, even after installation of brightness in game on a minimum.

2) Detail textures consist of one layer instead of two.

3) GammaOffsetBlue, GammaOffsetGreen, and GammaOffsetRed parameters don't work any more.

4) Fog affects differently on meshes and bsp:
[img][/img]
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

Sure you installed latest shader files? Low brightness should make it almost entirely black, so I am really wondering how it can be to bright. Maybe need more information what you mean.

but for

2) Yes, that's normal and was only changed in later utglr's (by me) to have more than one. Current method only allows traditional, 1 layer method.
3) It's not existing anymore currently. I don't see the need for it anymore also to be honest.
4) That was always the case and also different in "old" renderers. Lighting and fog are differently implemented for BSP and meshes. Perhaps it displays different now so that you noticed it :)

However, you can modify all about gamma directly in the shader files, check out for

Code: Select all

// Gamma
TotalColor.r=pow(TotalColor.r,1.8-Gamma);
TotalColor.g=pow(TotalColor.g,1.8-Gamma);
TotalColor.b=pow(TotalColor.b,1.8-Gamma);
in DrawGouraud.frag (meshes), DrawComplexSinglePass.frag (BSP) and DrawTile.frag (well, the "rest").

Will upload a new version again soon, added fading out for detailtextures like in the other renderers.
Last edited by Smirftsch on Sun May 01, 2016 8:59 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
sn260591
OldUnreal Member
Posts: 116
Joined: Wed Aug 17, 2011 2:54 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by sn260591 »

Low brightness should make it almost entirely black, so I am really wondering how it can be to bright. Maybe need more information what you mean.
Two screenshots for comparison:
d3d9 with Brightness=0.400000 (I prefer this setting)
[img][/img]
xopengl with Brightness=0.200000
[img][/img]
2) Yes, that's normal and was only changed in later utglr's (by me) to have more than one. Current method only allows traditional, 1 layer method.
Two layers were used in all the renderers. Is it possible to do the same in xopengl?
4) That was always the case and also different in "old" renderers. Perhaps it displays different now.
In xopengl fog isn't capable to hide meshes completely:
[img][/img]
But in d3d9 fog hides meshes and bsp without distinctions:
[img][/img]
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

The implementation for gamma is quite differing from the other renderers- but can surely darken it some more depending on level if 0.0 or 0.1 is not sufficient.

This fog problem I fixed already here, sorry, forgot it isn't in current UT build yet.
Sometimes you have to lose a fight to win the war.
sn260591
OldUnreal Member
Posts: 116
Joined: Wed Aug 17, 2011 2:54 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by sn260591 »

The implementation for gamma is quite differing from the other renderers- but can surely darken it some more depending on level if 0.0 or 0.1 is not sufficient.
I have set the brightness to 0.0, but the result is all the same a little brighter, than it is necessary to me. How can I change the brightness in shaders?
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

the values I mentioned above:

Code: Select all

// Gamma
TotalColor.r=pow(TotalColor.r,1.8-Gamma);
TotalColor.g=pow(TotalColor.g,1.8-Gamma);
TotalColor.b=pow(TotalColor.b,1.8-Gamma);
the 1.8 in this case needs to be lowered. Depending on what value you have, you may want to change it to something like this:

Code: Select all

if((PolyFlags & PF_Modulated)!=PF_Modulated)
{
      // Gamma
      TotalColor.r=pow(TotalColor.r,3.6-Gamma*2);
      TotalColor.g=pow(TotalColor.g,3.6-Gamma*2);
      TotalColor.b=pow(TotalColor.b,3.6-Gamma*2);
}
To have a wider scale with Gamma (which is is having the 0.1 steps).
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

www.oldunreal.com/betatest/XOpenGL1.0.0.8_UT4.36.zip

* Fixed hopefully remaining fogging issues
* Fixed some performance issue causing very short stuttering sometimes.
* Fixed some memory cleanup issue
* Shader cleanups, using a global include now.
* Thanks to han, sharing experience and code I was able to integrate full support for UED.
Last edited by Smirftsch on Mon May 23, 2016 5:44 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

www.oldunreal.com/betatest/XOpenGL1.0.0.8_UT4.36.zip

* Fixed hopefully remaining fogging issues
* Fixed some performance issue causing very short stuttering sometimes.
* Fixed some memory cleanup issue
* Shader cleanups, using a global include now.
* Thanks to han, sharing experience and code I was able to integrate full support for UED.
Crash @start with a Radeon 7850 (Crimson 15.6.2) - 1.0.0.7 is working
No problem with a GeForce 750 Ti
Last edited by lowenz on Tue May 24, 2016 1:51 pm, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

that's rather unexpected. Can you give me a log?
Sometimes you have to lose a fight to win the war.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

that's rather unexpected. Can you give me a log?
Here!

Log: Opened viewport
Log: Bound to XOpenGLDrv.dll
Log: XOpenGL: Creating new OpenGL context.
Init: XOpenGL: Glew successfully initialized.
Init: XOpenGL: DesiredColorBits: 32
Init: XOpenGL: DesiredDepthBits: 24
Init: XOpenGL: Setting PixelFormat: 11
Init: GL_VENDOR     : ATI Technologies Inc.
Init: GL_RENDERER   : AMD Radeon HD 7800 Series
Init: GL_VERSION    : 3.3.13440 Core Profile Forward-Compatible Context 16.200.1010.1002
Init: GL_SHADING_LANGUAGE_VERSION    : 4.50
Init: GLEW Version  : 1.13.0
Init: OpenGL 3.3 context initialized!
Log: XOpenGL: Fullscreen NewX 1920 NewY 1080
Log: ChangeDisplaySettings with RefreshRate: 1920x1080, 60 Hz
Log: XOpenGL: MaxCombinedTextureImageUnits: 192
Log: XOpenGL: MaxDualSourceDrawBuffers: 1
Log: XOpenGL: MaxTextureSize: 16384
Log: XOpenGL: MaxAnisotropy = (16/16)
Log: XOpenGL: NumAASamples: (0/8)
Log: XOpenGL: No compiler messages for xopengl/DrawSimple.vert
Log: XOpenGL: No compiler messages for xopengl/DrawSimple.frag
Log: XOpenGL: No compiler messages for xopengl/DrawTile.vert
Log: XOpenGL: Log compiling xopengl/DrawTile.frag Fragment shader failed to compile with the following errors:
ERROR: 0:116: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawTile.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplex.vert
Log: XOpenGL: Log compiling xopengl/DrawComplex.frag Fragment shader failed to compile with the following errors:
ERROR: 0:118: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawComplex.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplexLM.vert
Log: XOpenGL: Log compiling xopengl/DrawComplexLM.frag Fragment shader failed to compile with the following errors:
ERROR: 0:118: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawComplexLM.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplexFM.vert
Log: XOpenGL: Log compiling xopengl/DrawComplexFM.frag Fragment shader failed to compile with the following errors:
ERROR: 0:93: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawComplexFM.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplexDT.vert
Log: XOpenGL: Log compiling xopengl/DrawComplexDT.frag Fragment shader failed to compile with the following errors:
ERROR: 0:119: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawComplexDT.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplexMT.vert
Log: XOpenGL: Log compiling xopengl/DrawComplexMT.frag Fragment shader failed to compile with the following errors:
ERROR: 0:117: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawComplexMT.frag
Log: XOpenGL: No compiler messages for xopengl/DrawGouraud.vert
Log: XOpenGL: Log compiling xopengl/DrawGouraud.frag Fragment shader failed to compile with the following errors:
ERROR: 0:239: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "uniform highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)
ERROR: error(#273) 1 compilation errors.  No code generated

Warning: XOpenGL: Failed compiling xopengl/DrawGouraud.frag
Log: XOpenGL: No compiler messages for xopengl/DrawGouraudMeshBuffer.vert
Log: XOpenGL: No compiler messages for xopengl/DrawGouraudMeshBuffer.frag
Log: XOpenGL: No compiler messages for xopengl/DrawComplexSinglePass.vert
Log: XOpenGL: Log compiling xopengl/DrawComplexSinglePass.frag Fragment shader failed to compile with the following errors:
ERROR: 0:221: error(#162) Wrong operand types: no operation "==" exists that takes a left-hand operand of type "highp 4-component vector of vec4" and a right operand of type "const float" (or there is no acceptable conversion)

Last edited by lowenz on Wed May 25, 2016 1:23 pm, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

Operand (conversion of FP variables) problem in the shaders.....
Last edited by lowenz on Wed May 25, 2016 1:27 pm, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

gah...

replace in DrawComplexSinglePass.frag, DrawGouraud.frag and DrawTile.frag

if (DrawColor != 0.0)

with

if (DrawColor.x > 0 || DrawColor.y > 0 || DrawColor.z > 0 || DrawColor.w > 0)

pretty much at the end of the file.

Not sure yet anyway if this will be final solution, it's for editor only now, so probably not. Nvidia and Intel I think which I used in between made this without problem, only AMD complains. Guess it's not fully valid after all.
Sometimes you have to lose a fight to win the war.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

gah...

replace in DrawComplexSinglePass.frag, DrawGouraud.frag and DrawTile.frag

if (DrawColor != 0.0)

with

if (DrawColor.x > 0 || DrawColor.y > 0 || DrawColor.z > 0 || DrawColor.w > 0)

pretty much at the end of the file.

Not sure yet anyway if this will be final solution, it's for editor only now, so probably not. Nvidia and Intel I think which I used in between made this without problem, only AMD complains. Guess it's not fully valid after all.
You can't compare with "==" or "!=" FP values.
It's a classic programming error :p (FP values are not "perfect numbers")
Last edited by lowenz on Thu May 26, 2016 7:23 pm, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

Oh, that's perfectly valid here since I really only need to know if one value is > 0, which is only for editor selection the case.  I don't need any real near or equal FP comparisons here. It's just that Intel or Nvidia allow me a method for that I found pretty handy, AMD doesn't.
But as said, I want to clean it up some more for editor anyway.

Although, while looking at it, just to check that

DrawColor.w > 0.0

is absolutely enough.
Last edited by Smirftsch on Fri May 27, 2016 8:55 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
shoober420
OldUnreal Member
Posts: 321
Joined: Sun Jun 17, 2012 7:21 pm

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by shoober420 »

Is there a Linux build of this?
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

for the 227j beta there is, for UT not yet due to the ancient toolchain needed. Also its working with SDL2, which I need/want to migrate to UT then as well. Will attempt to make a build though, just can't promise when.
Sometimes you have to lose a fight to win the war.
User avatar
r2rX
OldUnreal Member
Posts: 9
Joined: Fri Jun 10, 2016 9:10 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by r2rX »

for the 227j beta there is, for UT not yet due to the ancient toolchain needed. Also its working with SDL2, which I need/want to migrate to UT then as well. Will attempt to make a build though, just can't promise when.
That's great news. I migrated to Linux recently and got Unreal Tournament & Unreal Gold up and running. It would be epic to have an updated OpenGL renderer for them. :)
Last edited by r2rX on Fri Jun 10, 2016 12:09 pm, edited 1 time in total.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

XOpenGL1.0.0.9_UT4.36 available.
Added OpenGLVersion option, to switch between OpenGL3.3 Core and OpenGLES3.0, some (low end) graphics card rather support GL ES than 3.3 Core, also performance may differ for these. Some OpenGL extensions like UseBufferInvalidation are unavailable for ES though.
Moved some intensive calculations into shaders (GPU) in order to reduce CPU usage quite some, this will increase overall performance especially for weaker CPU's when using XOpenGL.
Sometimes you have to lose a fight to win the war.
User avatar
REA
OldUnreal Member
Posts: 16
Joined: Wed Jun 29, 2016 6:35 pm

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by REA »

Hi,

Thanks for the effort. GNU/Linux port of UT desperately needs an up-to-date renderer. The most recent renderer was ported from UTGLR'e OpenGL renderer which is quite old for modern distros; lacks many options and many preferences are now broken.

http://www.letsplayut.com/
http://www.oldunreal.com/cgi-bin/yabb2/YaBB.pl?num=1355076731

I am volunteer for alpha/beta testing if needed. Thank you.

Regards.
Last edited by REA on Wed Jun 29, 2016 8:59 pm, edited 1 time in total.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

AMD Radeon HD 7850

OpenGL ES -> 100 FPS
OpenGL "Core" -> 25 FPS

Same spot, same settings.....

With a GeForce 750 Ti over9000 FPS.....
Last edited by lowenz on Wed Jun 29, 2016 9:59 pm, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

AMD Radeon HD 7850

OpenGL ES -> 100 FPS
OpenGL "Core" -> 25 FPS

Same spot, same settings.....

With a GeForce 750 Ti over9000 FPS.....
Which pretty much confirms what I said :D although I am not sure why the 7850 behaves so bad compared to the 750 Ti.
Last edited by Smirftsch on Thu Jun 30, 2016 8:43 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

Hi,

Thanks for the effort. GNU/Linux port of UT desperately needs an up-to-date renderer. The most recent renderer was ported from UTGLR'e OpenGL renderer which is quite old for modern distros; lacks many options and many preferences are now broken.

http://www.letsplayut.com/
http://www.oldunreal.com/cgi-bin/yabb2/YaBB.pl?num=1355076731

I am volunteer for alpha/beta testing if needed. Thank you.

Regards.
yeah, I'm very much aware about the poor situation for Linux currently, but can't give any promises at the moment when I will find enough time, life doesn't give me a rest right now.
The entire toolchain is older than any debian release and that speaks for itself. All Linux build would require a recompile in theory...

PS: Welcome here :)
Last edited by Smirftsch on Thu Jun 30, 2016 8:56 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

No video output, black screen (but the audio is playing!) with a GeForce 9600M (mobile system with Windows 10 64 and lastest drivers for the 9600M from MS Windows Update).

No difference between "Core" and "ES".

OpenGL message closing UT manually with "quit" command:
"too many errors", LOL
Last edited by lowenz on Fri Jul 01, 2016 8:00 am, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
lowenz
OldUnreal Member
Posts: 338
Joined: Fri Dec 28, 2007 9:31 am

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by lowenz »

Addendum: Enabling "Precache" the screen shows "Precaching" word forever with the music playing :p
Last edited by lowenz on Fri Jul 01, 2016 8:03 am, edited 1 time in total.
The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
User avatar
Smirftsch
Administrator
Posts: 9009
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali

Re: XOpenGL OpenGL3 / OpenGL4 renderer for UnrealTournament

Post by Smirftsch »

I've seen this error only if the card isn't supporting the OpenGL version fully. In other words, neither OpenGL3.3 nor OpenGL ES 3.0 are correctly supported by the drivers of this card as far I can tell.
Sometimes you have to lose a fight to win the war.

Return to “OpenGL & D3D for Unreal & UnrealTournament”