BY RENDROC
FIXED: SHADOWS
ISSUES REMAINING: SKYBOX
CROSSHAIR 2D
I met rendroc on MTBS and he written a shader fix for shadows not using helix's wrapper but by editing the games pre existing shader library that is used each time game loads(instructions on how are in comments). The skybox/crosshair issue isn't that bad since crosshair is optional. Skybox isnt that a big of deal either and Id rate the game as great after fix which is a huge leap since it was unplayable before.
HOW TO INSTALL:
Launch the game all the way till you are able to control your character.
Exit out then navigate to ../Documents/My Games/Velvet Assassin/
Delete the folder labeled SHADER
Navigate to ../Velvet Assassin/shader/
Paste world_rtsm_pass.fx inside then replace.
WRITTEN BY RENDROC
ReplyDeleteI will post the fix in my original topic after some more testing, but here is the code that I added to the world_rtsm_pass.fx file in the Shader directory in Velvet Assassin. Right after this line:
Code:
Out.Position = mul( P, Transforms[0] );
Add this:
Code:
float nw = Out.Position.w;
if (Out.Position.z<=0)
{
Out.Position.z = 100;
}
Out.Position.z = Out.Position.z / nw;
Out.Position.x = Out.Position.x / nw;
Out.Position.y = Out.Position.y / nw;
Out.Position.w = 1;
I hope this will be of some use to you. The key is that Out.Position.w must be 1, otherwise the Stereo looks different from Mono and is always wrong. I read somewhere that the vertex position is being modified by the 3Dvision driver, so perhaps when Position.w = 1 it cancels out. I think that when w=1 this represents the very back plane of the camera or light, so perhaps that is related to convergence on the far plane being parallel, but that's only a blind guess.
Theoretically, I don't think this is a perfect solution. The z=100 line is just to make sure that if something is behind the camera, it isn't used for the shadowmap. The problem with w=1 is that interpolation gets messed up, so that if something like a wall connects from the front of the camera (light) behind the camera (light), it gets interpolated incorrectly and blocks the camera (light) entirely. There may be some other interpolation problems as well. But, I tried it out a bit and it seems to work.
merci
ReplyDelete