Message Boards

Topic: 32bpp color mode  (Read 66795 times)

Offline JamesDunne

  • Posts: 14
    • View Profile
32bpp color mode
« on: December 24, 2012, 22:08:43 »
Hey everyone,

I've been working on the 32bpp color port of the Odamex client for the last week or so. I just wanted to "officially" throw this out there for everyone to help test out. Let us know what you think!

This 32bpp port only enhances the rendering portion of the game; i.e. it does not affect how textures or sprites are loaded. 32bpp removes the need for color-mapping which is what the 8bpp mode uses to find the "best" color among the 256 available colors for the lighting effect. 32bpp mode just uses the raw RGB value of the darkened color for lighting and thus you won't see any aliasing effects (e.g. colors shifting hue from red to brown).

Latest binary (Win32) is here:
http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-71dcc38.zip

You can find future binaries (check Last Modified date stamp) here, and the required SDL dlls:
http://bittwiddlers.org/ftp/jim/software/odamex/

In order to use these binaries you'll need the VC2012 C++ redistributable for x86 platform installed. You can download it here. Be sure to pick x86!

http://www.microsoft.com/en-us/download/details.aspx?id=30679

I have all the code up on my GitHub repository at:
https://github.com/JamesDunne/odamex

There is a README-32bpp file included in the ZIP package which documents what has changed and what issues are known.

If you're looking for a quick test, just go to the Video Options menu screen and flip "32-bit color" to "Yes". The change should take effect immediately. For an even quicker way, use the console (~) and type "vid_32bpp 1" to enable and "vid_32bpp 0" to disable (i.e. go back to 8bpp).

All vanilla DOOM and DOOM 2 maps are working.

Please help by testing out custom PWADs with extra BOOM effects enabled, e.g. ACS scripting, custom lighting, translucency, etc.

Also, please report any significant performance loss while in 32bpp compared to the 8bpp mode. Use `vid_fps 1` to show the FPS counter in the lower-left corner of the screen and report those numbers, along with which PWAD and map.
« Last Edit: December 25, 2012, 02:05:29 by JamesDunne »

Offline Hekksy

  • Doomin' since '96
  • Administrator
  • Posts: 154
    • View Profile
Re: 32bpp color mode
« Reply #1 on: December 24, 2012, 23:33:14 »
I have to say, this is amazing and I am very happy you did this. I am very appreciative of your work and am anxious to see what you come up with next as well :)

Of course I will be playing with this and reporting any bugs I come across.

Also how about some screenshots??

http://www.facebook.com/media/set/?set=oa.10151156938562007&type=1
Join the Odamex Steam group! http://steamcommunity.com/groups/odamex
Check out the Odamex Discord as well: https://discord.gg/vHUu236

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #2 on: December 25, 2012, 02:05:09 »
Just implemented SSE2 optimizations to make 32bpp alpha-blending insanely fast. I don't get any slowdowns from the full 35fps in 1920x1080 with full-screen translucency effects now.

Latest Win32 build:
http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-ae4f6d9.zip

Offline Hekksy

  • Doomin' since '96
  • Administrator
  • Posts: 154
    • View Profile
Re: 32bpp color mode
« Reply #3 on: December 25, 2012, 12:30:10 »
A few bugs:



All player color icons appear a shade of blue in the scoreboard despite them being different colors.



Translucency effects appear to not be as translucent anymore? zddl4.wad map00 for testing

Oh no! IDL2013l.wad now includes rainbow road!


It's supposed to look like this. This screenshot was taken in 0.6.2 release:


map11 has a few issues with rendering these textures.. not sure what the problem is. They also appear tutti frutti in 8-bit mode in your modified client:


This screenshot is what it is supposed to look like. It was taken with 0.6.2 released:


Also in map11 of idl2013l, dying in the slime shows a great testcolor green screen! This is actually worse when you switch back to 8-bit mode in your modified client... because then it turns tutti frutti and crashes:


This screenshot was taken in 0.6.2 release. This area is supposed to look like this:


Last but not least, particle fountains are rendered in tutti frutti! Cool, but not intentional:


By the slime the particle fountains are green, right in front of me where the SG pickup is they are supposed to be blue. This is idl2013l map29
« Last Edit: December 25, 2012, 13:14:54 by HeX9109 »
Join the Odamex Steam group! http://steamcommunity.com/groups/odamex
Check out the Odamex Discord as well: https://discord.gg/vHUu236

Ant P.

  • Nobody
Re: 32bpp color mode
« Reply #4 on: December 25, 2012, 21:10:28 »
Looks really nice, but ae4f6d9 runs at about 25fps for me (on doom 2 demo 1 @ 1280x720). Callgrind says 35% of the total time is in rt_draw4cols(), ~20% in the SSE2 code. Using GCC 4.6.3 on amd64.

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #5 on: December 25, 2012, 23:42:52 »
GCC does not impress me with its performance. I really don't have much to tell you on that one.

Offline Pseudoscientist

  • Posts: 43
  • Peanut gallery
    • View Profile
Re: 32bpp color mode
« Reply #6 on: December 26, 2012, 00:42:07 »
GCC does not impress me with its performance. I really don't have much to tell you on that one.
Just a note, official binaries are built with gcc.
Sorry Guest, you are banned from using this forum!

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #7 on: December 26, 2012, 12:37:41 »
Yeah I know :P. I wonder if GCC is not inlining the SSE2 functions. I really wanted to avoid copy/pasting all that code 4 times. Maybe a macro would suffice then.

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #8 on: December 26, 2012, 20:31:40 »
Latest build should fix most of those issues listed above:

http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-31a372f.zip

Remaining issues are:
  • Scoreboard colors
  • Translucent parts have bright/dark vertical stripes in them

Ant P.

  • Nobody
Re: 32bpp color mode
« Reply #9 on: December 26, 2012, 20:56:58 »
Forget what I posted, I'm retarded.

I compiled it without setting C[XX]FLAGS properly. CMake's system is weird. Runs perfectly now that I'm actually using -O2.

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #10 on: December 26, 2012, 21:30:08 »
Ant P. - haha. No worries.

Try to build the bleeding edge, commit id 65f3f3c93bc13a40b273e339162225bdb879f7f9 on my GitHub https://github.com/JamesDunne/odamex

Latest Win32 build: http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-65f3f3c.zip

Ant P.

  • Nobody
Re: 32bpp color mode
« Reply #11 on: December 26, 2012, 22:54:29 »
I've been playing with `bind mouse3 "toggle vid_32bpp"`, it's pretty cool flipping back and forward between them.

Anyway here's all the feedback I've got so far:
- The distance fog/light fade gradient still has sharp steps (they're most visible on flats). Any plan to change that?
- You've probably noticed already, the transparent menu background rectangles get shifted to the right in 32-bit mode.
- Changing the brightness (F11) doesn't work.
- Haven't tried this with the newest revision, but the server build's broken (looks like dead code to me, but I'm not a C++ expert)

Also, thought you might like to know it runs fine under clang too. :)

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #12 on: December 27, 2012, 03:11:31 »
Thanks for that. Already discovered and fixed most of that.

Latest Win32 build:
http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-28182dd.zip

Yeah I can't get the server EXE to build either.

There are only 32 distinct light levels. I'd like to make the lighting more smooth. This concept of light levels is spread throughout the code and would be tough to factor out.

Offline JamesDunne

  • Posts: 14
    • View Profile
Re: 32bpp color mode
« Reply #13 on: December 27, 2012, 05:26:57 »
Latest Win32 build fixes all known issues to date:

http://bittwiddlers.org/ftp/jim/software/odamex/odamex-32bpp-007e46b.zip

Offline capodecima

  • Posts: 122
  • Brodamex Player
    • View Profile
Re: 32bpp color mode
« Reply #14 on: December 27, 2012, 05:44:22 »
how run it ? i tried just replace odamex.exe with this new exe file and it say some error :o .