D3D Chams problem
Hello, i have a problem with displaying my simple shader chams ingame. Basically i need 2 layers, one for enemies behind objects and another for visible enemies, obvious stuff. Problem is, I can get those two layers to work independently as 2 different functions, but they don't work as intended simultaneously and when i try to combine them to make a classic chams algorithm they do partially work, but i can't see my highlighted shaders at all through some of the ingame objects, such as lightposts, trees, ground etc. Simple Wallhack with 1 shader color works just fine, i can see everything through any object. The code i'm using works fine in a FPS game, such as HL2, but my targeted game is TPS and that made me thinking if my problem has something to do with a different z-Buffer (since the camera is not attached to the playable character, and enemies behind something can become visible by me moving the camera around). I tried different shader generators and most of the times in addition to the main problem i see both layers on occluded enemies and the "visible" layer disappear only when i move my camera really close to the wall that he's behind. Are there different approaches to chams making for an FPS and a TPS game? Should i look into DepthBias?
P.S. Sorry if i posted in the wrong section, feel free to move this thread