Flugan Wrapper
  1 / 2    
Flugan wrapper was born 18 month ago near the end of the Chiri/Helix "war" before bo3b entered the picture. I questioned myself if I could make a wrapper and the answer is no using normal methods the interfaces are so intricate and enormous. By hooking the COM function tables I could get at the few functions interesting. I got stuck as MS continuously resets the Context COM table making it unworkable. Using Nektra hooking library it has been reliable ever since, thank you bo3b for the introduction. I believe Flugan Wrapper works in places where 3Dmigoto fails is because it's not a wrapper. Progress report: Ported most of the code to DX10 but not all games work. Running in Devil May Cry 4. I've had loads of progress lately after making ShaderOverride=skip to work. Latest news: Working on porting wrapper to DX10, why not :) ASM assembler seems picky about syntax. Modeled after Microsoft disassembler output. Added some more instructions dumped from Witcher 3. Compiles ASM Capable of removing and reintroducing Watcher 3 fix while running the game using shader reload. ShaderHunting using skip ShaderOverride using skip Compiles 3Dmigoto HLSL fixes. Need binary to validate the ASM assembler. Dumps binary or ASM d3dcompiler_47.dll is on my OneDrive for both 32-bit and 64-bit. requires d3dcompiler_47.dll which is preinstalled on Windows 8.1 Runs on Windows 7 and 8.1 for the most part as far as I know. Only have a Windows 8.1 3D setup while my older SLI machine is elsewhere without a 3D monitor.
Flugan wrapper was born 18 month ago near the end of the Chiri/Helix "war" before bo3b entered the picture. I questioned myself if I could make a wrapper and the answer is no using normal methods the interfaces are so intricate and enormous. By hooking the COM function tables I could get at the few functions interesting. I got stuck as MS continuously resets the Context COM table making it unworkable. Using Nektra hooking library it has been reliable ever since, thank you bo3b for the introduction.

I believe Flugan Wrapper works in places where 3Dmigoto fails is because it's not a wrapper.

Progress report:
Ported most of the code to DX10 but not all games work. Running in Devil May Cry 4.

I've had loads of progress lately after making ShaderOverride=skip to work.


Latest news:
Working on porting wrapper to DX10, why not :)

ASM assembler seems picky about syntax. Modeled after Microsoft disassembler output.
Added some more instructions dumped from Witcher 3.
Compiles ASM

Capable of removing and reintroducing Watcher 3 fix while running the game using shader reload.
ShaderHunting using skip
ShaderOverride using skip
Compiles 3Dmigoto HLSL fixes.

Need binary to validate the ASM assembler.
Dumps binary or ASM

d3dcompiler_47.dll is on my OneDrive for both 32-bit and 64-bit.
requires d3dcompiler_47.dll which is preinstalled on Windows 8.1
Runs on Windows 7 and 8.1 for the most part as far as I know.
Only have a Windows 8.1 3D setup while my older SLI machine is elsewhere without a 3D monitor.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#1
Posted 05/26/2015 06:43 PM   
Flugan, I just want to say a huge Thank You! Thanks to your magic, (being an unlucky? owner of Windows 8.1 and a victim of suportless developers) I am able to enjoy the world of the Inquisitor and recently the world of Geralt. Like many other people with two eyes, I can't -any more- find interest in the two dimensional virtual worlds... You and all the guys @ Helixmod are therefore, in my (both) eyes, Gods of the Real Virtual Reality. :) Thank you all.
Flugan, I just want to say a huge Thank You!
Thanks to your magic, (being an unlucky? owner of Windows 8.1 and a victim of suportless developers) I am able to enjoy the world of the Inquisitor and recently the world of Geralt.
Like many other people with two eyes, I can't -any more- find interest in the two dimensional virtual worlds...
You and all the guys @ Helixmod are therefore, in my (both) eyes, Gods of the Real Virtual Reality. :) Thank you all.

Overclocked Intel® Core™i5-4690k Quad Core
32 Gb RAM
8GB GEFORCE GTX 1080
3D Vision 2
Windows 10 64 Bit
NVidia driver 419.17
SAMSUNG - UE55H8000 Smart 3D 55" Curved
Philips G-Sync 272G
Oculus Rift with Touch controlers

#2
Posted 05/26/2015 09:30 PM   
[quote="costiq"]Flugan, I just want to say a huge Thank You! Thanks to your magic, (being an unlucky? owner of Windows 8.1 and a victim of suportless developers) I am able to enjoy the world of the Inquisitor and recently the world of Geralt. Like many other people with two eyes, I can't -any more- find interest in the two dimensional virtual worlds... You and all the guys @ Helixmod are therefore, in my (both) eyes, Gods of the Real Virtual Reality. :) Thank you all.[/quote] signed
costiq said:Flugan, I just want to say a huge Thank You!
Thanks to your magic, (being an unlucky? owner of Windows 8.1 and a victim of suportless developers) I am able to enjoy the world of the Inquisitor and recently the world of Geralt.
Like many other people with two eyes, I can't -any more- find interest in the two dimensional virtual worlds...
You and all the guys @ Helixmod are therefore, in my (both) eyes, Gods of the Real Virtual Reality. :) Thank you all.


signed

ASUS X99-A, i7-5960X, GTX980, 16GB DDR4 2666MHz Corsair, Plextor M.2 SSD 512GB, 3D Vision 2

#3
Posted 05/26/2015 09:45 PM   
Thanks Flugan. I too deeply appreciate all the hard work all you guys are putting in!
Thanks Flugan.

I too deeply appreciate all the hard work all you guys are putting in!

Windows 10 64-bit, Intel 7700K @ 5.1GHz, 16GB 3600MHz CL15 DDR4 RAM, 2x GTX 1080 SLI, Asus Maximus IX Hero, Sound Blaster ZxR, PCIe Quad SSD, Oculus Rift CV1, DLP Link PGD-150 glasses, ViewSonic PJD6531w 3D DLP Projector @ 1280x800 120Hz native / 2560x1600 120Hz DSR 3D Gaming.

#4
Posted 05/27/2015 12:15 AM   
Of note, since Witcher3 is stripping ALL of the header information including reflection data, that means we have untyped variables for most of the shaders. Translation: the Decompiler can't do the job correctly even when debugged, because the information it needs is lost. Because of that, I wired up Flugan's original Assembler so it is available for shader hunting and fixing. I want to be clear that anyone could have done this at any time, the project is open-source. Still, this is the first instance where we really can't do a proper job without it. Back a little over a year ago, it wasn't clear if going with Assembler or debugging the Decompiler was the best way to go. We got some initial good success with the Decompiler, so I went with that as a difficult judgment call. High level languages are almost always better for the programmer/hacker. It's not clear if CDPR will listen to pleas for not calling StripShader, but I generally expect corporations to be stupid. Hence, the reasoning to bring up the Assembler to give us the direct translation option for shaders. This will be back to Asm, but that's similar to the HelixMod approach and should give us some extra flexibility. Right at the moment, I don't think it's quite ready, but soon.
Of note, since Witcher3 is stripping ALL of the header information including reflection data, that means we have untyped variables for most of the shaders. Translation: the Decompiler can't do the job correctly even when debugged, because the information it needs is lost.

Because of that, I wired up Flugan's original Assembler so it is available for shader hunting and fixing. I want to be clear that anyone could have done this at any time, the project is open-source. Still, this is the first instance where we really can't do a proper job without it.


Back a little over a year ago, it wasn't clear if going with Assembler or debugging the Decompiler was the best way to go. We got some initial good success with the Decompiler, so I went with that as a difficult judgment call. High level languages are almost always better for the programmer/hacker.

It's not clear if CDPR will listen to pleas for not calling StripShader, but I generally expect corporations to be stupid. Hence, the reasoning to bring up the Assembler to give us the direct translation option for shaders. This will be back to Asm, but that's similar to the HelixMod approach and should give us some extra flexibility.

Right at the moment, I don't think it's quite ready, but soon.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

#5
Posted 05/27/2015 12:48 AM   
Thanks Flugan for your work. :)
Thanks Flugan for your work. :)

Intel Core i7-3820, 4 X 3,60 GHz overclocked to 4,50 GHz ; EVGA Titan X 12VRAM ; 16 GB Corsair Vengeance DDR-1600 (4x 4 GB) ; Asus VG278H 27-inch incl. 3D vision 2 glasses, integrated transmitter ; Xbox One Elite wireless controller ; Windows 10HTC VIVE 2,5 m2 roomscale3D VISION GAMERS - VISIT ME ON STEAM and feel free to add me: http://steamcommunity.com/profiles/76561198064106555 YOUTUBE: https://www.youtube.com/channel/UC1UE5TPoF0HX0HVpF_E4uPQ STEAM CURATOR: https://store.steampowered.com/curator/33611530-Streaming-Deluxe/ Image

#6
Posted 05/27/2015 06:44 PM   
You're welcome! It's a long time since I used the IDA Pro trial version to reverse engineer the hash function without which you can't change and re-assemble shaders. My biggest feat of reverse engineering so far.
You're welcome!

It's a long time since I used the IDA Pro trial version to reverse engineer the hash function without which you can't change and re-assemble shaders. My biggest feat of reverse engineering so far.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#7
Posted 05/27/2015 07:18 PM   
Thanks Great fix for all Windows 8.1 user's.
Thanks Great fix for all Windows 8.1 user's.

Gigabyte Z370 Gaming 7 32GB Ram i9-9900K GigaByte Aorus Extreme Gaming 2080TI (single) Game Blaster Z Windows 10 X64 build #17763.195 Define R6 Blackout Case Corsair H110i GTX Sandisk 1TB (OS) SanDisk 2TB SSD (Games) Seagate EXOs 8 and 12 TB drives Samsung UN46c7000 HD TV Samsung UN55HU9000 UHD TVCurrently using ACER PASSIVE EDID override on 3D TVs LG 55

#8
Posted 05/27/2015 07:40 PM   
Porting DX11 wrapper to DX10. Early version but fairly complete.
Porting DX11 wrapper to DX10.
Early version but fairly complete.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#9
Posted 05/28/2015 12:33 AM   
I'm interested in how my hunting implementation works dealing with ASM as don't export HLSL. When converting a dump of witcher shaders I got a crash bug in my command-line tool. I have not looked into the overhead of having hunt toggle like this and there is no overlay.
I'm interested in how my hunting implementation works dealing with ASM as don't export HLSL. When converting a dump of witcher shaders I got a crash bug in my command-line tool.

I have not looked into the overhead of having hunt toggle like this and there is no overlay.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#10
Posted 05/29/2015 07:15 PM   
Solved a bug in vertex shader hunting.
Solved a bug in vertex shader hunting.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#11
Posted 06/03/2015 10:45 AM   
I'm attemting to fix 3D in Pinball Arcade in the open beta directx 11 version. Lightning effects are rendered at screen depth and I have isolated a pixel shader but no vertex shader connected to the effext. The game has very few shaders I'm not sure how well my wrapper handles loads of shaders. 67DEA7EF415281D0-ps_replace.txt [code] cbuffer cbEnv : register(b0) { float4 m_position : packoffset(c0); float4 m_color : packoffset(c1); float4 m_size2i : packoffset(c2); float4 m_eye : packoffset(c3); float4 m_vx : packoffset(c4); float4 m_vy : packoffset(c5); float4 m_vz : packoffset(c6); float4 m_vp : packoffset(c7); float4 m_shadowMapInfo : packoffset(c8); float4 m_limit : packoffset(c9); } SamplerState simpleSampler_s : register(s0); Texture2D<float4> simpleTexture : register(t0); Texture2DMS<float> depth : register(t1); Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : SV_POSITION0, float2 v1 : TEXCOORD0, float4 v2 : COLOR0, out float4 o0 : SV_TARGET0) { float4 r0,r1,r2; uint4 bitmask, uiDest; float4 fDest; r0.xy = (int2)v0.xy; r0.zw = float2(0.000000e+000,0.000000e+000); r0.x = depth.Load(r0.xy, 0.000000000e+000).x; r0.x = 2.000039967e-005 + r0.x; r0.x = 1.000020027e+000 / r0.x; r0.y = r0.x < 0.000000000e+000; r0.x = r0.y ? -r0.x : r0.x; r0.x = m_vz.w * r0.x; r0.yzw = m_vx.xyz * r0.xxx; depth.GetDimensions(fDest.x, fDest.y, fDest.z); r1.xy = fDest.xy; r1.xy = v0.xy / r1.xy; r1.zw = r1.xy * float2(2.000000e+000,2.000000e+000) + float2(-1.000000e+000,-1.000000e+000); r2.xyz = simpleTexture.Sample(simpleSampler_s, r1.xy).xyz; r2.xyz = m_color.xyz * r2.xyz; r0.yzw = r1.zzz * r0.yzw; r0.yzw = r0.yzw * m_vx.www + m_vp.xyz; r1.xyz = m_vy.xyz * r0.xxx; r1.xyz = r1.xyz * r1.www; r0.yzw = r1.xyz * m_vy.www + r0.yzw; r0.xyz = m_vz.xyz * r0.xxx + r0.yzw; r0.xyz = -m_position.xyz + r0.xyz; r0.x = dot(r0.xyz, r0.xyz); r0.y = sqrt(r0.x); r0.x = 1.000000000e+000 + r0.x; r0.x = m_size2i.y / r0.x; r0.y = m_limit.w * r0.y; r0.y = min(1.000000000e+000, r0.y); r0.x = r0.y * -r0.x + r0.x; r0.xyz = min(m_limit.xyz, r0.xxx); o0.xyz = r2.xyz * r0.xyz; o0.w = 1.000000000e+000; return; } [/code] ASM: [code] // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 // // // Buffer Definitions: // // cbuffer cbEnv // { // // float4 m_position; // Offset: 0 Size: 16 // float4 m_color; // Offset: 16 Size: 16 // float4 m_size2i; // Offset: 32 Size: 16 // float4 m_eye; // Offset: 48 Size: 16 [unused] // float4 m_vx; // Offset: 64 Size: 16 // float4 m_vy; // Offset: 80 Size: 16 // float4 m_vz; // Offset: 96 Size: 16 // float4 m_vp; // Offset: 112 Size: 16 // float4 m_shadowMapInfo; // Offset: 128 Size: 16 [unused] // float4 m_limit; // Offset: 144 Size: 16 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // simpleSampler sampler NA NA 0 1 // simpleTexture texture float4 2d 0 1 // depth texture float 2dMS 1 1 // cbEnv cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float xy // TEXCOORD 0 xy 1 NONE float // COLOR 0 xyzw 2 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[10], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2dms(0) (float,float,float,float) t1 dcl_input_ps_siv linear noperspective v0.xy, position dcl_output o0.xyzw dcl_temps 3 ftoi r0.xy, v0.xyxx mov r0.zw, l(0,0,0,0) ldms_indexable(texture2dms)(float,float,float,float) r0.x, r0.xyzw, t1.xyzw, l(0) add r0.x, r0.x, l(0.000020) div r0.x, l(1.000020), r0.x lt r0.y, r0.x, l(0.000000) movc r0.x, r0.y, -r0.x, r0.x mul r0.x, r0.x, cb0[6].w mul r0.yzw, r0.xxxx, cb0[4].xxyz resinfo_indexable(texture2dms)(float,float,float,float) r1.xy, l(0), t1.xyzw div r1.xy, v0.xyxx, r1.xyxx mad r1.zw, r1.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000) sample_indexable(texture2d)(float,float,float,float) r2.xyz, r1.xyxx, t0.xyzw, s0 mul r2.xyz, r2.xyzx, cb0[1].xyzx mul r0.yzw, r0.yyzw, r1.zzzz mad r0.yzw, r0.yyzw, cb0[4].wwww, cb0[7].xxyz mul r1.xyz, r0.xxxx, cb0[5].xyzx mul r1.xyz, r1.wwww, r1.xyzx mad r0.yzw, r1.xxyz, cb0[5].wwww, r0.yyzw mad r0.xyz, cb0[6].xyzx, r0.xxxx, r0.yzwy add r0.xyz, r0.xyzx, -cb0[0].xyzx dp3 r0.x, r0.xyzx, r0.xyzx sqrt r0.y, r0.x add r0.x, r0.x, l(1.000000) div r0.x, cb0[2].y, r0.x mul r0.y, r0.y, cb0[9].w min r0.y, r0.y, l(1.000000) mad r0.x, r0.y, -r0.x, r0.x min r0.xyz, r0.xxxx, cb0[9].xyzx mul o0.xyz, r0.xyzx, r2.xyzx mov o0.w, l(1.000000) ret // Approximately 32 instruction slots used [/code]
I'm attemting to fix 3D in Pinball Arcade in the open beta directx 11 version.

Lightning effects are rendered at screen depth and I have isolated a pixel shader but no vertex shader connected to the effext. The game has very few shaders I'm not sure how well my wrapper handles loads of shaders.

67DEA7EF415281D0-ps_replace.txt
cbuffer cbEnv : register(b0)
{
float4 m_position : packoffset(c0);
float4 m_color : packoffset(c1);
float4 m_size2i : packoffset(c2);
float4 m_eye : packoffset(c3);
float4 m_vx : packoffset(c4);
float4 m_vy : packoffset(c5);
float4 m_vz : packoffset(c6);
float4 m_vp : packoffset(c7);
float4 m_shadowMapInfo : packoffset(c8);
float4 m_limit : packoffset(c9);
}
SamplerState simpleSampler_s : register(s0);
Texture2D<float4> simpleTexture : register(t0);
Texture2DMS<float> depth : register(t1);

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : SV_POSITION0,
float2 v1 : TEXCOORD0,
float4 v2 : COLOR0,
out float4 o0 : SV_TARGET0)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = (int2)v0.xy;
r0.zw = float2(0.000000e+000,0.000000e+000);
r0.x = depth.Load(r0.xy, 0.000000000e+000).x;
r0.x = 2.000039967e-005 + r0.x;
r0.x = 1.000020027e+000 / r0.x;
r0.y = r0.x < 0.000000000e+000;
r0.x = r0.y ? -r0.x : r0.x;
r0.x = m_vz.w * r0.x;
r0.yzw = m_vx.xyz * r0.xxx;
depth.GetDimensions(fDest.x, fDest.y, fDest.z);
r1.xy = fDest.xy;
r1.xy = v0.xy / r1.xy;
r1.zw = r1.xy * float2(2.000000e+000,2.000000e+000) + float2(-1.000000e+000,-1.000000e+000);
r2.xyz = simpleTexture.Sample(simpleSampler_s, r1.xy).xyz;
r2.xyz = m_color.xyz * r2.xyz;
r0.yzw = r1.zzz * r0.yzw;
r0.yzw = r0.yzw * m_vx.www + m_vp.xyz;
r1.xyz = m_vy.xyz * r0.xxx;
r1.xyz = r1.xyz * r1.www;
r0.yzw = r1.xyz * m_vy.www + r0.yzw;
r0.xyz = m_vz.xyz * r0.xxx + r0.yzw;
r0.xyz = -m_position.xyz + r0.xyz;
r0.x = dot(r0.xyz, r0.xyz);
r0.y = sqrt(r0.x);
r0.x = 1.000000000e+000 + r0.x;
r0.x = m_size2i.y / r0.x;
r0.y = m_limit.w * r0.y;
r0.y = min(1.000000000e+000, r0.y);
r0.x = r0.y * -r0.x + r0.x;
r0.xyz = min(m_limit.xyz, r0.xxx);
o0.xyz = r2.xyz * r0.xyz;
o0.w = 1.000000000e+000;
return;
}

ASM:
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
// Buffer Definitions:
//
// cbuffer cbEnv
// {
//
// float4 m_position; // Offset: 0 Size: 16
// float4 m_color; // Offset: 16 Size: 16
// float4 m_size2i; // Offset: 32 Size: 16
// float4 m_eye; // Offset: 48 Size: 16 [unused]
// float4 m_vx; // Offset: 64 Size: 16
// float4 m_vy; // Offset: 80 Size: 16
// float4 m_vz; // Offset: 96 Size: 16
// float4 m_vp; // Offset: 112 Size: 16
// float4 m_shadowMapInfo; // Offset: 128 Size: 16 [unused]
// float4 m_limit; // Offset: 144 Size: 16
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// simpleSampler sampler NA NA 0 1
// simpleTexture texture float4 2d 0 1
// depth texture float 2dMS 1 1
// cbEnv cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xy
// TEXCOORD 0 xy 1 NONE float
// COLOR 0 xyzw 2 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[10], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2dms(0) (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 3
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ldms_indexable(texture2dms)(float,float,float,float) r0.x, r0.xyzw, t1.xyzw, l(0)
add r0.x, r0.x, l(0.000020)
div r0.x, l(1.000020), r0.x
lt r0.y, r0.x, l(0.000000)
movc r0.x, r0.y, -r0.x, r0.x
mul r0.x, r0.x, cb0[6].w
mul r0.yzw, r0.xxxx, cb0[4].xxyz
resinfo_indexable(texture2dms)(float,float,float,float) r1.xy, l(0), t1.xyzw
div r1.xy, v0.xyxx, r1.xyxx
mad r1.zw, r1.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r1.xyxx, t0.xyzw, s0
mul r2.xyz, r2.xyzx, cb0[1].xyzx
mul r0.yzw, r0.yyzw, r1.zzzz
mad r0.yzw, r0.yyzw, cb0[4].wwww, cb0[7].xxyz
mul r1.xyz, r0.xxxx, cb0[5].xyzx
mul r1.xyz, r1.wwww, r1.xyzx
mad r0.yzw, r1.xxyz, cb0[5].wwww, r0.yyzw
mad r0.xyz, cb0[6].xyzx, r0.xxxx, r0.yzwy
add r0.xyz, r0.xyzx, -cb0[0].xyzx
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.y, r0.x
add r0.x, r0.x, l(1.000000)
div r0.x, cb0[2].y, r0.x
mul r0.y, r0.y, cb0[9].w
min r0.y, r0.y, l(1.000000)
mad r0.x, r0.y, -r0.x, r0.x
min r0.xyz, r0.xxxx, cb0[9].xyzx
mul o0.xyz, r0.xyzx, r2.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 32 instruction slots used

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#12
Posted 06/05/2015 08:33 AM   
I have been working on a build targeting Far Cry 4 and the INI config being used to filter depth and stereo mode. At one point when I thought I was done I had sound but no picture, black screen. Had to restart from scratch and actually checking if my code was working more often. And eliminate the black screen along the way. I have not tested the new build proper yet on Far Cry 4. I'm quite proud to have managed to hook IDXGISwapChain::Present without leaving d3d11.dll. Yay, the hook is fairly underutilized containing button handling and stereo texture updating. I'm still very proud of the achievement. Give me some fireworks to mark the occasion.
I have been working on a build targeting Far Cry 4 and the INI config being used to filter depth and stereo mode.

At one point when I thought I was done I had sound but no picture, black screen.
Had to restart from scratch and actually checking if my code was working more often.
And eliminate the black screen along the way.

I have not tested the new build proper yet on Far Cry 4.

I'm quite proud to have managed to hook IDXGISwapChain::Present without leaving d3d11.dll.

Yay, the hook is fairly underutilized containing button handling and stereo texture updating.
I'm still very proud of the achievement. Give me some fireworks to mark the occasion.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#13
Posted 06/09/2015 07:52 PM   
Sorry, but what is IDXGISwapChain::Present used for? Just curious...
Sorry, but what is IDXGISwapChain::Present used for? Just curious...

ASUS X99-A, i7-5960X, GTX980, 16GB DDR4 2666MHz Corsair, Plextor M.2 SSD 512GB, 3D Vision 2

#14
Posted 06/09/2015 08:01 PM   
It's called once per frame and is the place to be to draw on top of the game.
It's called once per frame and is the place to be to draw on top of the game.

Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?

donations: ulfjalmbrant@hotmail.com

#15
Posted 06/09/2015 08:04 PM   
  1 / 2    
Scroll To Top