OldUnreal / Unreal-testing

OU 227 testing
Other
28 stars 0 forks source link

OpenGL: Rendering emitters in HUD makes them appear infront of a mesh instead behind it. (works in XOpenGL and D3D9) #36

Closed Krull0r closed 3 years ago

Krull0r commented 3 years ago

My Redux weapons use emitter effects as muzzle flashes. Sprite- and MeshEmitters ( both use meshes ) work fine but the normal emitter class which use the sprite rendering gets rendered infront of the mesh in OpenGL.

XOpenGL and D3D9 result: 2021_3_16_14_45_40_210-nyleve

OpenGL result: 2021_3_16_14_46_16_42-nyleve

Marco888 commented 3 years ago

This happens because of Z-range hack option on some render devices. It makes meshes drawn on HUD flattered closer to screen then what it really is to avoid clipping with world geometry. I can't really fix this issue.

In UnrealScript you should draw the mesh actor with ClearZ enabled (in function RenderOverlays, Canvas.DrawActor(self,,true)).

Krull0r commented 3 years ago

Alright that explains it. I made them now a sprite emitter those work fine.