xray effect - Page 2

xray effect

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

change:
glDepthTest(true)
to:
glDepthTest(false)
in the lua code
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

That will set them to always render in that style, though, not just when they are occluded by a feature?
User avatar
chillaaa
Posts: 234
Joined: 16 Mar 2005, 00:12

Post by chillaaa »

Maelstrom says that is the case.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

That way it always get's rendered on top.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Yeah, I was after not always rendering on top, otherwise proper occlusion is not quite possible just yet. I suppose it would be reasonably difficult to decide whether or not a unit is being obscured from the camera.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

invert the depth test
glDepthTest(GL.GREATER)

(don't forget to set it back to GL.LEQUAL) when you are done
Post Reply

Return to “Lua Scripts”