VOGONS


First post, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

This is a general topic for Halo games.

Let's begin with a reported problem from the old "WIP versions" thread.

Vaporeon wrote:
I have been trying WIP62 with Halo Custom Edition, and for the most part it's great and renders the game better than any current […]
Show full quote

I have been trying WIP62 with Halo Custom Edition, and for the most part it's great and renders the game better than any current GPU can do alone.

I have noticed a couple of issues though, one there seems to be some strange vertical scaling issue that sometimes occurs in fullscreen, and always occurs when forcing windowed. You can tell from the scaling artifacts in the game HUD, they should not be there. The second is with the games glass shader, however no GPU I have ever owned has rendered this correctly anyway. dgVoodoo2 comes the closest by successfully rendering something at least, only with color issues. I'm not sure what the correct thing would be to do since this game has been somewhat broken since release with numerous fog, glass and water issues that vary depending on GPU. Even a geforce 6600GT does not render the glass at all.

Also I specify Custom Edition here since they changed the shaders between that and the initial retail release. The retail version does not work for me at all and blackscreens in some cases.

These can be seen in this screenshot.

lowenz wrote:
Better than any (current) GPU? Where? Can you point some examples? […]
Show full quote

Better than any (current) GPU? Where? Can you point some examples?

About the broken shaders since 2003: https://www.reddit.com/r/HaloCERefined/

And don't say thanks, mate 😁
(and remember to patch the game to the 1.10 version)

Vaporeon wrote:
Examples would be any nvidia GPU with recent-ish drivers. I have personally tested a wide range of cards from the 6600GT to the […]
Show full quote

Examples would be any nvidia GPU with recent-ish drivers. I have personally tested a wide range of cards from the 6600GT to the GTX1080, and they all do not render the glass bumpmap. Neither do AMD cards for that matter. I suspect this is due to the games config.txt system that has a whole bunch of now irreverent vendor-specific hacks in it, recent Intel iGPU's seem to work better that anything else natively (render-correctness wise) and conveniently there are no entries for those in the file. New nvidia and amd/ati cards get caught by wildcard entries.

I am well aware of the Refined stuff, in fact you should look at the credits file some time. Anyway, it essentially is one giant hack, the glass in those maps for example is just faked using the somewhat working water shader instead. While this does look better than the broken the glass you see on current GPU's in some cases, it will always be worse that the real glass shader working as it should have been. Faking effects that way has severe limitations, the bitmap textures for water as an example are limited to half the resolution of what can be used on glass in Halo.

I do like the Refined project for that game and it is superior to stock, but make no mistake it is a compromise of making the best out of the worst by working around limitations with game assets only, rather than truly fixing them in the engine. Being a closed source game there is only so much you can do.

If it is possible dgVoodoo2 can give provide what the game is expecting when it attempts to render these shaders, it would be a massive improvement over what we currently have.

Maybe I misunderstand it, but Halo Custom Edition == Halo CE Refined?
I installed and tried plain Halo Custom Edition and for the little time I played with it, I couldn't see rendering problems.
The water may have not been reported bad rendered, but I compared the dgVoodoo rendererd one vs native rendered one.

HaloCE1.png
HaloCE2.png
A bit noisy but seems to be OK. There are no differences between the native and dgv one (for me).

Also, Vaporeon, could you plz attach some savegame files for the glass rendering and other problematic scenes?

Reply 1 of 19, by MartinBFFan

User metadata
Rank Newbie
Rank
Newbie

Halo 2 Vista
DX9

Certain screen effects such as Color grading in main menu or cinematic black bars appear completely black
The game sometimes crashes on level load
Some HUD and UI elements are missing

Attachments

Reply 2 of 19, by Dege

User metadata
Rank Oldbie
Rank
Oldbie
MartinBFFan wrote:
Halo 2 Vista DX9 […]
Show full quote

Halo 2 Vista
DX9

Certain screen effects such as Color grading in main menu or cinematic black bars appear completely black
The game sometimes crashes on level load
Some HUD and UI elements are missing

Unfortunately this game utilizes some parts of DX9 (through DXVA) that has no direct counterparts in DX11 so I cannot implement it.
I'll look at HUD and UI elements though.

Reply 3 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

Hi.

There are two versions of the game, the original retail release, and a later internet download release called Custom Edition. The latter has custom map support, and also uses slightly different shades in the engine. Most people use custom edition. As for giving you saves I can't really due to how the game save system works. Custom edition only comes with some stock MP maps, and the other maps must be supplied. I use custom builds of the campaign, and the save files are tied to the exact map file build, so unless you have the exact same map file the save will not load. If you start the game with devmode you can load any level though, for example `map_name b30` is a good water example, and `map_name c40` for glass as an example of the issues are at the level start. You need campaign maps with stock assets though, I can link you these if you need.

Unrelated but v2.61 broke decals as seen in the following image. These worked in 2.6
gvzFUHT.png

Reply 4 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

Hey, what happens to be the max texture size in dgVoodoo2? This custom edition map here uses an animated texture on the teleporter that is quite large. it works when using native d3d9, but not with dgVoodoo2 where it renders plain white.

Thanks for fixing those decals in the WIP by the way.

Reply 5 of 19, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

Uhm… currently 8192x8192.

BTW, how to test the map? I wanted to give it a quick go, so I copied it to the MAPS folder but typing command 'map_name' gave me an error message (cmd not currently available).
I'm not having the Custom Edition game version, right? 🤣

Reply 6 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

That would explain it as that texture is almost 16k wide.
You need to start the game with -devmode to enable map_name without mods, you can also start that map in the MP menus.

Also, If you want to try the single player in Custom Edition to see what I meant about glass and stuff, you can get them in custom edition format here and here. (both are needed for it to work, just replace the existing files) Also keep in mind without mods like "chimera" CE hashes every map on startup so it can take a while to load.

Reply 7 of 19, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

Ok, I added support for DX feature level 11.0 because 10.1 supports 8K x 8K as maximum texture size. Now animated texture renders correctly on the test map.

As for the bumped glass stuff: I checked out map 'b40' and saw this (with dgVoodoo):
haloceglass.png

Glass is drawn with the following pixel shader:

     ps.2.0

def c4, 0.000000, 1.000000, 0.000000, 8.000000
def c5, 2.000000, -1.000000, 0.000000, 0.000000
dcl v0
dcl t0.rg
dcl t1
dcl t2
dcl t3
dcl_2d s0
dcl_2d s1 <--- declaring 2d texture for sampler1
dcl_volume s2 <--- declaring 3d texture for sampler2
texld r0, t0, s0
mad_pp r2.rgb, c5.r, r0, c5.g
dp3_pp r9.r, t1, r2
dp3_pp r9.g, t2, r2
dp3_pp r9.b, t3, r2
mov_pp r4.r, t1.a
mov_pp r4.g, t2.a
mov_pp r4.b, t3.a
dp3_pp r9.a, r9, r4
add_pp r9.a, r9.a, r9.a
mad_pp r1.rgb, r9, r9.a, -r4
dp3 r1.a, r1, r1
rsq r1.a, r1.a
mul_pp r8.rgb, r1, r1.a
texld_pp r3, r8, s2
texld_pp r10, t2, s1
log_pp r5.r, r3.r
log_pp r5.g, r3.g
log_pp r5.b, r3.b
mul r0.rgb, r5, c4.a
exp_pp r7.r, r0.r
exp_pp r7.g, r0.g
exp_pp r7.b, r0.b
add_pp r4.rgb, r3, -r7
mad_pp r9.rgb, c5.r, r10, c5.g
dp3_pp r4.a, r9, c0
log_pp r4.a, r4.a
add_pp r4.a, r4.a, r4.a
exp_pp r7.a, r4.a
mov_pp r6.rgb, -c2
add_pp r1.rgb, r6, c1
mad_pp r3.rgb, r1, r7.a, c2
mad_pp r7.rgb, r4, r3, r7
mov_pp r5.a, -c2.a
add_pp r0.a, r5.a, c1.a
mad_pp r7.a, r0.a, r7.a, c2.a
mul_pp r2.a, v0.a, c3.r
mul_pp r7.a, r7.a, r2.a
mul_pp r11.rgb, r7, r7.a
mov_pp r11.a, c4.g
mov_pp oC0, r11

The shader expects a plain 2D texture for sampler1 and a volume texture for sampler2, however cube textures are bound to both samplers when the glass is rendered. I guess this is why natively the glass is completely missing. Bound texture type and the one declared in the shader must match or the behavior is undefined (roughly).
Did glass rendering work in the past, on old contemporary hw? This bug doesn't seem to be something that exploited some special behavior of old hw and only got broken later.
More like as if the game engine itself selected wrong textures for the rendering. (It creates 2 volume textures, so they must be used for something.)

Reply 8 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

The glass (and water) Have never worked as intended even on cards current at the time of the games release, but they have all been broken in different ways so I was wondering if you had an idea of what was going on. thanks for looking into it.

Also thanks for fixing those animated textures.

Reply 9 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

Thanks for fixing the glass shader, it's nice to see it working.

The color issues you were having is Custom Edition specific, on the retail release of halo the shader works with dgvoodoo2. I have since found out that some ati/amd cards can render it natively, someone with a 290X said it worked for them.

I have spotted another issue, this window on the first level is broken. Things behind it are much brighter than they should be. See attached images. This window does not use the games "glass" shader by the way.

Also The glow on some weapons seem off, it is too bright. Lower is intended in attached image.

Thanks for working on this.

This has been in all recent versions of dgVoodoo2.

Attachments

  • glowcompare.jpg
    Filename
    glowcompare.jpg
    File size
    203.01 KiB
    Views
    456 views
    File license
    Fair use/fair dealing exception
  • intended02.jpg
    Filename
    intended02.jpg
    File size
    183.23 KiB
    Views
    456 views
    File license
    Fair use/fair dealing exception
  • intended01.jpg
    Filename
    intended01.jpg
    File size
    188.78 KiB
    Views
    456 views
    File license
    Fair use/fair dealing exception
  • broken02.jpg
    Filename
    broken02.jpg
    File size
    297.58 KiB
    Views
    456 views
    File license
    Fair use/fair dealing exception
  • broken01.jpg
    Filename
    broken01.jpg
    File size
    209.82 KiB
    Views
    456 views
    File license
    Fair use/fair dealing exception

Reply 12 of 19, by dr.zeissler

User metadata
Rank Oldbie
Rank
Oldbie

Really sad that this fantastic game has so much issues with the shaders.
I have two mac-versions. The old PPC 1.x and the newer Universal 2.x
So sad that there was no OS9 version like shown in the demo with jobs.

PPC Version does not support shaders (e.g. shadereffects) on my GF4-Ti4600, neither on G4-Mini with 9200.
Shaders also does not work on PPC x600pro. It was great on my iMac 24" with HD2600 (ATI) there were all
shaders great. I thought on later 4850 iMac it was also OK, but on my newer macs there are LOT's of problems with this gane.

C2D-Mini 9400m => WaterShaders are defect
C2D-Mini 320m => Watershaders are defect
QC-Mini HD3000 => 2.0 Shaders are OK, butr not that beautiful, white Flickering every fiew seconds, very anoing, after upgrading to 2.04 totally broken. Water is pink, textures are black and so on.

Using HaloMD seems to give me only the former demo-version of halo, not the full game and the shaders seem to be not as good as on the old one with HD2600. The mirrors do not look so nice.

CPU: PII 133-333 MOBO: SNI-D981 RAM: 512- FDD: Dualfloppy 3,5"HD/5,25"HD - 3,5"HD - 5,25"DD ISA-Catweasel HDD: 2x40GB - DVD
ISA(3): Audician32-S2Dreamblaster - GusACE PCI(3): Monster3D- Intel NW AGP(1): 3dfx V3-3000

Reply 13 of 19, by Vaporeon

User metadata
Rank Newbie
Rank
Newbie

Nvidia GTX 1080, but It seems to be version of the map I am using. I just tested the stock one and it looks correct as your image.
What version of the game are you using? I can give you a map with the shader that is broken.

Reply 14 of 19, by Dege

User metadata
Rank Oldbie
Rank
Oldbie
Vaporeon wrote on 2020-01-03, 17:53:

What version of the game are you using? I can give you a map with the shader that is broken.

That would be cool, thanks! I have Halo Combat Evolved, the maps you gave me last time are still in the \MAPS folder.

Reply 17 of 19, by dr.zeissler

User metadata
Rank Oldbie
Rank
Oldbie

Any solutions for the mac version?

CPU: PII 133-333 MOBO: SNI-D981 RAM: 512- FDD: Dualfloppy 3,5"HD/5,25"HD - 3,5"HD - 5,25"DD ISA-Catweasel HDD: 2x40GB - DVD
ISA(3): Audician32-S2Dreamblaster - GusACE PCI(3): Monster3D- Intel NW AGP(1): 3dfx V3-3000