dragon.star Posted October 23, 2015 Share Posted October 23, 2015 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 Quote Link to comment Share on other sites More sharing options...
drarem Posted October 29, 2015 Share Posted October 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted October 30, 2015 Share Posted October 30, 2015 Shader problem, who you gonna call? SHADMAR. http://www.leadwerks.com/werkspace/topic/6027-leadwerks-3-how-do-i-questions-and-answers/page__hl__x-ray__st__20 Quote Link to comment Share on other sites More sharing options...
shadmar Posted October 30, 2015 Share Posted October 30, 2015 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. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
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.