Jump to content

X-ray model behind walls


dragon.star
 Share

Recommended Posts

Hello everyone,

 

I have several views in my game (1st/3rd/top). For the top view mode, i am trying to have an X-ray or glow effect of my player when behind a wall (instead of adjusting the camera with pick), i found a few shaders but they don't work, i think they're for earlier versions of opengl, is there one somewhere that will work with leadwerks?

 

Thanks

post-15543-0-09455600-1445579726.jpg

Link to comment
Share on other sites

here's a guess, don't know if it's practical, but constantly ray pick from camera to your model. if it gets intercepted by the base mesh or terrain, then change the material temporarily on the prefab or mdl to a different material, perhaps brighter value with only the Z-sort and depth mask checked. You can play around with it manually using the editor and the materials.

Link to comment
Share on other sites

You dont really need a special shader, just do as drarem says and change to a material wich has no depth test and some emission when there is no rayhit, swicth back when camera ray hits.

That is what is done in that old video Thirsty Phanter linked.

 

Macklebee has an more advanced shader, but it's advanced stuff to set up, so I'd go with the raycast method.

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...