3Dmigoto now open-source...
  58 / 141    
[quote="lefuneste"][quote="bo3b"] I don't see any other exceptions. Your crc 1ebdb3925859d5f6-vs.bin I don't see when I run the game and do Instant Action or first campaign. [/quote] It's because this shader is coming from the 2.0 alpha version. Unfortunately for the moment, this version is linked to a map that is not free ($50 !) and protected, so it is not worth to download it... I though that the last 1.5.3 version used the same shader than the 2.0, because when they deploy the last 1.5.2 => 1.5.3 update, I had to rename all the fixed shaders with the same names used for 2.0 version. But I just checked: the problem with the night illumination is not present on 1.5.3 and is on the 2.0... I also checked that, even if there are a lot of shaders with the " Known bad code for instruction", all are now dumped. I am sorry for having make you spend your time...I know that I am annoying and clumsy, but as you have DCS on your PC, maybe you could have a look on my problem with the usage of depth buffer for label filtering ? And I also did not manage to solve efficiently the problem with the horizon (use free flight with Su25T and roll plane to the right or the left to see it). I had to find from another shader the view matrix and add additional fix for left or right eye regarding the roll angle of the plane). I'm not proud of that fix... In which mission did you find the glitching shader when at night ?[/quote] OK, no problem, it was worth downloading to find out that it actually supports DK2 directly. I did not know that. For that night shader, I think I made my own mission, then was able to choose what time of day to fly, and I chose middle of the night. Apparently there were bad guys though, as they blew me up while I was shader hunting. Not sure, only ran it to look for these problems.
lefuneste said:
bo3b said:
I don't see any other exceptions. Your crc 1ebdb3925859d5f6-vs.bin I don't see when I run the game and do Instant Action or first campaign.

It's because this shader is coming from the 2.0 alpha version. Unfortunately for the moment, this version is linked to a map that is not free ($50 !) and protected, so it is not worth to download it...
I though that the last 1.5.3 version used the same shader than the 2.0, because when they deploy the last 1.5.2 => 1.5.3 update, I had to rename all the fixed shaders with the same names used for 2.0 version. But I just checked: the problem with the night illumination is not present on 1.5.3 and is on the 2.0...
I also checked that, even if there are a lot of shaders with the " Known bad code for instruction", all are now dumped.
I am sorry for having make you spend your time...I know that I am annoying and clumsy, but as you have DCS on your PC, maybe you could have a look on my problem with the usage of depth buffer for label filtering ?
And I also did not manage to solve efficiently the problem with the horizon (use free flight with Su25T and roll plane to the right or the left to see it). I had to find from another shader the view matrix and add additional fix for left or right eye regarding the roll angle of the plane). I'm not proud of that fix...
In which mission did you find the glitching shader when at night ?

OK, no problem, it was worth downloading to find out that it actually supports DK2 directly. I did not know that.

For that night shader, I think I made my own mission, then was able to choose what time of day to fly, and I chose middle of the night. Apparently there were bad guys though, as they blew me up while I was shader hunting. Not sure, only ran it to look for these problems.

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

Posted 02/23/2016 08:40 AM   
I have another question. In the d3dx file, under [Rendering], how do you use this: [code]; Position variables to correct in pixel shaders. ;fix_ObjectPosition1=PointPositionAndInverseRadius ;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5[/code] I'm trying to make a screen size correction similar to what you'd see in some UE3 fixes. I think the above code is what I need. But I'm not sure how to use this in a shader. Typical UE3 Dx9 screen size correction fix: [code]// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // float4 AmbientColorAndSkyFactor; // float4 DiffuseOverrideParameter; // float4 LightMapScale[2]; // sampler2D LightMapTextures[2]; // float4 MinZ_MaxZRatio; // sampler2D PixelTexture2D_0; // sampler2D PixelTexture2D_1; // sampler2D PixelTexture2D_2; // sampler2D PixelTexture2D_3; // sampler2D SceneColorTexture; // float4 ScreenPositionScaleBias; // float4 SpecularOverrideParameter; // float4 UniformPixelVector_0; // float4 UniformPixelVector_1; // float4 UniformPixelVector_2; // float4 UniformPixelVector_3; // // // Registers: // // Name Reg Size // ------------------------- ----- ---- // UniformPixelVector_0 c0 1 // ScreenPositionScaleBias c1 1 // MinZ_MaxZRatio c2 1 // DiffuseOverrideParameter c4 1 // SpecularOverrideParameter c5 1 // LightMapScale c8 2 // UniformPixelVector_1 c10 1 // UniformPixelVector_2 c11 1 // UniformPixelVector_3 c12 1 // AmbientColorAndSkyFactor c13 1 // LightMapTextures s0 2 // SceneColorTexture s2 1 // PixelTexture2D_0 s3 1 // PixelTexture2D_1 s4 1 // PixelTexture2D_2 s5 1 // PixelTexture2D_3 s6 1 // ps_3_0 def c3, 0.816496611, 0.577350259, 0, 1001 def c6, 3, 2, -1, 4 def c7, 8, 0.0299999993, 0.0199999996, 0.00999999978 def c14, 0.0111111114, 0.699999988, 0, 0 def c15, -0.707106769, -0.408248305, 0.577350259, 0.707106769 dcl_texcoord4 v0 dcl_texcoord6 v1.xyz dcl_texcoord5 v2.xyw dcl_texcoord v3.xy dcl_texcoord1 v4.xy dcl_2d s0 dcl_2d s1 dcl_2d s2 dcl_2d s3 dcl_2d s4 dcl_2d s5 dcl_2d s6 def c50, 0.5, 0, 0, 0 dcl vPos.xy mov r11.xy, vPos.xy rcp r11.z, c210.x //Screen size (constant c210 is defined in dx9settings.ini) rcp r11.w, c210.y //Screen size (constant c210 is defined in dx9settings.ini) mul r11.xy, r11.xy, r11.zw mul r11.zw, r11.zw, c50.xx add r12.xy, r11.xy, r11.zw rcp r0.x, v2.w mul r0.xy, r0.x, v2 mad r0.xy, r0, c1, c1.wzzw mov r0.zw, c3.z texldl r0, r12, s2 //r0 changed to r12 mov r1.xzw, c6 add r0.x, -r1.z, -c2.y add r0.x, -r0.x, r0.w rcp r0.x, r0.x mad r0.x, -c2.x, r0.x, -v2.w mul_sat r0.x, r0.x, c14.x ..etc [/code] And here's a Dx11 shader that (I think) needs this correction: [code]cbuffer _Globals : register(b0) { float4x4 ScreenToWorldMatrix : packoffset(c0); float4 SpherePositionRadius : packoffset(c4); bool bDecompressSceneColor : packoffset(c5); float4 LightColorAndFalloffExponent : packoffset(c6); float3 DistanceFieldParameters : packoffset(c7); float4x4 ScreenToShadowMatrix : packoffset(c8); float4 ShadowBufferAndTexelSize : packoffset(c12); float ShadowOverrideFactor : packoffset(c13); bool bReceiveDynamicShadows : packoffset(c13.y); bool bEnableDistanceShadowFading : packoffset(c13.z); float2 DistanceFadeParameters : packoffset(c14); float4 DeferredRenderingParameters : packoffset(c15); float4 UVScaleBias : packoffset(c16); int MinZ : packoffset(c17); float4 ClearColor : packoffset(c18); float4 LevelVolumeDimensions : packoffset(c19); float4 LevelVolumePosition : packoffset(c20); float4 VoxelSizeUVW : packoffset(c21); float4 VoxelSizeXYZ : packoffset(c22); uint LightID : packoffset(c23); struct { float3 WorldPosition; float InvRadius; float3 Color; float FallOffExponent; float3 Direction; float SourceLength; float2 SpotAngles; float2 MinShadowOpacity; float SourceRadius; float MinRoughness; float CharacterLight; float InvSquaredFalloff; uint LightID; float3 Padding; } LightProperties : packoffset(c24); float LightingOptions : packoffset(c30); } cbuffer PSOffsetConstants : register(b2) { float4 ScreenPositionScaleBias : packoffset(c0); float4 MinZ_MaxZRatio : packoffset(c1); float NvStereoEnabled : packoffset(c2); float4 DiffuseOverrideParameter : packoffset(c3); float4 SpecularOverrideParameter : packoffset(c4); float4 CameraPositionPS : packoffset(c5); float4 ScreenTexelSize : packoffset(c6); float4 ViewportPositionScaleBias : packoffset(c7); float4 TransLightingVolumeMin : packoffset(c8); float4 TransLightingVolumeInvSize : packoffset(c9); float2 NumMSAASamples : packoffset(c10); } SamplerState WorldNormalGBufferTexture_s : register(s0); SamplerState SpecularGBufferTexture_s : register(s1); SamplerState DiffuseGBufferTexture_s : register(s2); SamplerState TransmissionGBufferTexture_s : register(s3); SamplerState SceneDepthTexture_s : register(s4); SamplerState LightAttenuationTexture_s : register(s5); SamplerState PreIntegratedBRDFTexture_s : register(s6); Texture2D<float4> LightAttenuationTexture : register(t0); Texture2D<float4> SceneDepthTexture : register(t1); Texture2D<float4> WorldNormalGBufferTexture : register(t2); Texture2D<float4> DiffuseGBufferTexture : register(t3); Texture2D<float4> TransmissionGBufferTexture : register(t4); Texture2D<float4> SpecularGBufferTexture : register(t5); Texture2D<float4> PreIntegratedBRDFTexture : register(t6); Texture3D<uint> LightVolumeClippingTexture : register(t7); Texture3D<uint> VisBlockingTexture : register(t8); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13; uint4 bitmask, uiDest; float4 fDest; r0.xy = v0.xy / v0.ww; r0.zw = r0.xy * ScreenPositionScaleBias.xy + ScreenPositionScaleBias.wz; r1.xyzw = LightAttenuationTexture.SampleLevel(LightAttenuationTexture_s, r0.zw, 0).xyzw; //r0.zw needs to be corrected? r2.xyzw = r1.xyzw * r1.xyzw; r1.x = r2.x + r2.y; r1.x = r1.z * r1.z + r1.x; r1.x = r1.x * r2.w; r1.x = cmp(0 < r1.x); if (r1.x != 0) { r1.x = SceneDepthTexture.SampleLevel(SceneDepthTexture_s, r0.zw, 0).x; r1.x = min(0.999000013, r1.x); r1.x = r1.x * MinZ_MaxZRatio.z + -MinZ_MaxZRatio.w; r1.x = 1 / r1.x; r0.xy = r1.xx * r0.xy; r1.yzw = ScreenToWorldMatrix._m01_m11_m21 * r0.yyy; r1.yzw = ScreenToWorldMatrix._m00_m10_m20 * r0.xxx + r1.yzw; r1.xyz = ScreenToWorldMatrix._m02_m12_m22 * r1.xxx + r1.yzw; r1.xyz = ScreenToWorldMatrix._m03_m13_m23 + r1.xyz; ..etc [/code]
I have another question. In the d3dx file, under [Rendering], how do you use this:

; Position variables to correct in pixel shaders.
;fix_ObjectPosition1=PointPositionAndInverseRadius
;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5

I'm trying to make a screen size correction similar to what you'd see in some UE3 fixes. I think the above code is what I need. But I'm not sure how to use this in a shader.

Typical UE3 Dx9 screen size correction fix:

// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// float4 AmbientColorAndSkyFactor;
// float4 DiffuseOverrideParameter;
// float4 LightMapScale[2];
// sampler2D LightMapTextures[2];
// float4 MinZ_MaxZRatio;
// sampler2D PixelTexture2D_0;
// sampler2D PixelTexture2D_1;
// sampler2D PixelTexture2D_2;
// sampler2D PixelTexture2D_3;
// sampler2D SceneColorTexture;
// float4 ScreenPositionScaleBias;
// float4 SpecularOverrideParameter;
// float4 UniformPixelVector_0;
// float4 UniformPixelVector_1;
// float4 UniformPixelVector_2;
// float4 UniformPixelVector_3;
//
//
// Registers:
//
// Name Reg Size
// ------------------------- ----- ----
// UniformPixelVector_0 c0 1
// ScreenPositionScaleBias c1 1
// MinZ_MaxZRatio c2 1
// DiffuseOverrideParameter c4 1
// SpecularOverrideParameter c5 1
// LightMapScale c8 2
// UniformPixelVector_1 c10 1
// UniformPixelVector_2 c11 1
// UniformPixelVector_3 c12 1
// AmbientColorAndSkyFactor c13 1
// LightMapTextures s0 2
// SceneColorTexture s2 1
// PixelTexture2D_0 s3 1
// PixelTexture2D_1 s4 1
// PixelTexture2D_2 s5 1
// PixelTexture2D_3 s6 1
//

ps_3_0
def c3, 0.816496611, 0.577350259, 0, 1001
def c6, 3, 2, -1, 4
def c7, 8, 0.0299999993, 0.0199999996, 0.00999999978
def c14, 0.0111111114, 0.699999988, 0, 0
def c15, -0.707106769, -0.408248305, 0.577350259, 0.707106769
dcl_texcoord4 v0
dcl_texcoord6 v1.xyz
dcl_texcoord5 v2.xyw
dcl_texcoord v3.xy
dcl_texcoord1 v4.xy
dcl_2d s0
dcl_2d s1
dcl_2d s2
dcl_2d s3
dcl_2d s4
dcl_2d s5
dcl_2d s6
def c50, 0.5, 0, 0, 0
dcl vPos.xy

mov r11.xy, vPos.xy
rcp r11.z, c210.x //Screen size (constant c210 is defined in dx9settings.ini)
rcp r11.w, c210.y //Screen size (constant c210 is defined in dx9settings.ini)
mul r11.xy, r11.xy, r11.zw
mul r11.zw, r11.zw, c50.xx
add r12.xy, r11.xy, r11.zw
rcp r0.x, v2.w
mul r0.xy, r0.x, v2
mad r0.xy, r0, c1, c1.wzzw
mov r0.zw, c3.z
texldl r0, r12, s2 //r0 changed to r12
mov r1.xzw, c6
add r0.x, -r1.z, -c2.y
add r0.x, -r0.x, r0.w
rcp r0.x, r0.x
mad r0.x, -c2.x, r0.x, -v2.w
mul_sat r0.x, r0.x, c14.x

..etc


And here's a Dx11 shader that (I think) needs this correction:

cbuffer _Globals : register(b0)
{
float4x4 ScreenToWorldMatrix : packoffset(c0);
float4 SpherePositionRadius : packoffset(c4);
bool bDecompressSceneColor : packoffset(c5);
float4 LightColorAndFalloffExponent : packoffset(c6);
float3 DistanceFieldParameters : packoffset(c7);
float4x4 ScreenToShadowMatrix : packoffset(c8);
float4 ShadowBufferAndTexelSize : packoffset(c12);
float ShadowOverrideFactor : packoffset(c13);
bool bReceiveDynamicShadows : packoffset(c13.y);
bool bEnableDistanceShadowFading : packoffset(c13.z);
float2 DistanceFadeParameters : packoffset(c14);
float4 DeferredRenderingParameters : packoffset(c15);
float4 UVScaleBias : packoffset(c16);
int MinZ : packoffset(c17);
float4 ClearColor : packoffset(c18);
float4 LevelVolumeDimensions : packoffset(c19);
float4 LevelVolumePosition : packoffset(c20);
float4 VoxelSizeUVW : packoffset(c21);
float4 VoxelSizeXYZ : packoffset(c22);
uint LightID : packoffset(c23);

struct
{
float3 WorldPosition;
float InvRadius;
float3 Color;
float FallOffExponent;
float3 Direction;
float SourceLength;
float2 SpotAngles;
float2 MinShadowOpacity;
float SourceRadius;
float MinRoughness;
float CharacterLight;
float InvSquaredFalloff;
uint LightID;
float3 Padding;
} LightProperties : packoffset(c24);

float LightingOptions : packoffset(c30);
}

cbuffer PSOffsetConstants : register(b2)
{
float4 ScreenPositionScaleBias : packoffset(c0);
float4 MinZ_MaxZRatio : packoffset(c1);
float NvStereoEnabled : packoffset(c2);
float4 DiffuseOverrideParameter : packoffset(c3);
float4 SpecularOverrideParameter : packoffset(c4);
float4 CameraPositionPS : packoffset(c5);
float4 ScreenTexelSize : packoffset(c6);
float4 ViewportPositionScaleBias : packoffset(c7);
float4 TransLightingVolumeMin : packoffset(c8);
float4 TransLightingVolumeInvSize : packoffset(c9);
float2 NumMSAASamples : packoffset(c10);
}

SamplerState WorldNormalGBufferTexture_s : register(s0);
SamplerState SpecularGBufferTexture_s : register(s1);
SamplerState DiffuseGBufferTexture_s : register(s2);
SamplerState TransmissionGBufferTexture_s : register(s3);
SamplerState SceneDepthTexture_s : register(s4);
SamplerState LightAttenuationTexture_s : register(s5);
SamplerState PreIntegratedBRDFTexture_s : register(s6);
Texture2D<float4> LightAttenuationTexture : register(t0);
Texture2D<float4> SceneDepthTexture : register(t1);
Texture2D<float4> WorldNormalGBufferTexture : register(t2);
Texture2D<float4> DiffuseGBufferTexture : register(t3);
Texture2D<float4> TransmissionGBufferTexture : register(t4);
Texture2D<float4> SpecularGBufferTexture : register(t5);
Texture2D<float4> PreIntegratedBRDFTexture : register(t6);
Texture3D<uint> LightVolumeClippingTexture : register(t7);
Texture3D<uint> VisBlockingTexture : register(t8);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : TEXCOORD0,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = v0.xy / v0.ww;
r0.zw = r0.xy * ScreenPositionScaleBias.xy + ScreenPositionScaleBias.wz;
r1.xyzw = LightAttenuationTexture.SampleLevel(LightAttenuationTexture_s, r0.zw, 0).xyzw; //r0.zw needs to be corrected?
r2.xyzw = r1.xyzw * r1.xyzw;
r1.x = r2.x + r2.y;
r1.x = r1.z * r1.z + r1.x;
r1.x = r1.x * r2.w;
r1.x = cmp(0 < r1.x);
if (r1.x != 0) {
r1.x = SceneDepthTexture.SampleLevel(SceneDepthTexture_s, r0.zw, 0).x;
r1.x = min(0.999000013, r1.x);
r1.x = r1.x * MinZ_MaxZRatio.z + -MinZ_MaxZRatio.w;
r1.x = 1 / r1.x;
r0.xy = r1.xx * r0.xy;
r1.yzw = ScreenToWorldMatrix._m01_m11_m21 * r0.yyy;
r1.yzw = ScreenToWorldMatrix._m00_m10_m20 * r0.xxx + r1.yzw;
r1.xyz = ScreenToWorldMatrix._m02_m12_m22 * r1.xxx + r1.yzw;
r1.xyz = ScreenToWorldMatrix._m03_m13_m23 + r1.xyz;

..etc

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

Posted 02/23/2016 10:07 AM   
[quote="4everAwake"]I have another question. In the d3dx file, under [Rendering], how do you use this: [code]; Position variables to correct in pixel shaders. ;fix_ObjectPosition1=PointPositionAndInverseRadius ;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5[/code] [/quote]I actually don't know - that's one of the original features from Chiri that I have never touched. It would not surprise me if this does not work any more, but I haven't tried it so I can't say for sure. It will require the shader to be freshly decompiled for it to be applied, as it is (I think) supposed to be used for an automatic adjustment on any newly dumped shaders. [quote]I'm trying to make a screen size correction similar to what you'd see in some UE3 fixes. I think the above code is what I need. But I'm not sure how to use this in a shader.[/quote]Well, this part I do ;-) You can define a [ShaderOverride] section for the shader and pass the current resolution width & height in with some IniParams, e.g. [code] [ShaderOverrideNeedScreenAdjustment] hash = ... x1 = res_width y1 = res_height [/code] I'm using x1 & y1 here, but you can choose any of the 32 available Ini Params (x, x1, x2, ..., x7, ditto for y, z & w). If you are using any of the ones that end in a number the syntax to load it is slightly different: [code] float4 res = IniParams.Load(int2(1, 0)); [/code] Where the first number in the int2 corresponds with the number on the IniParam (the second number is always 0). If you find the resolution you get is wrong (especially if not using a native resolution), try changing get_resolution_from to depth_stencil. Notably, in addition to res_width/height there is also rt_width/height, which retuns the dimensions of the currently active render target - in many cases this will be the same as the resolution, but I use this to detect when an off-screen render target is in use and for this type of adjustment it might technically be the correct thing to use... but since it will usually match the resolution it probably won't matter. The resolution is alternatively available through StereoParams.Load(int2(2, 0)).xy, which is obtained using a different technique again and should give you the resolution that the monitor is being driven at by the card. This is probably always the same as res_width/height when get_resolution_from=swap_chain is in use (but I'm not 100% certain of that - games do too many weird things).
4everAwake said:I have another question. In the d3dx file, under [Rendering], how do you use this:

; Position variables to correct in pixel shaders.
;fix_ObjectPosition1=PointPositionAndInverseRadius
;fix_ObjectPosition1Multiplier=1, (stereoScreenRes.x/stereoScreenRes.y)*0.5, -0.5

I actually don't know - that's one of the original features from Chiri that I have never touched. It would not surprise me if this does not work any more, but I haven't tried it so I can't say for sure. It will require the shader to be freshly decompiled for it to be applied, as it is (I think) supposed to be used for an automatic adjustment on any newly dumped shaders.

I'm trying to make a screen size correction similar to what you'd see in some UE3 fixes. I think the above code is what I need. But I'm not sure how to use this in a shader.
Well, this part I do ;-)

You can define a [ShaderOverride] section for the shader and pass the current resolution width & height in with some IniParams, e.g.
[ShaderOverrideNeedScreenAdjustment]
hash = ...
x1 = res_width
y1 = res_height


I'm using x1 & y1 here, but you can choose any of the 32 available Ini Params (x, x1, x2, ..., x7, ditto for y, z & w). If you are using any of the ones that end in a number the syntax to load it is slightly different:
float4 res = IniParams.Load(int2(1, 0));

Where the first number in the int2 corresponds with the number on the IniParam (the second number is always 0).

If you find the resolution you get is wrong (especially if not using a native resolution), try changing get_resolution_from to depth_stencil.

Notably, in addition to res_width/height there is also rt_width/height, which retuns the dimensions of the currently active render target - in many cases this will be the same as the resolution, but I use this to detect when an off-screen render target is in use and for this type of adjustment it might technically be the correct thing to use... but since it will usually match the resolution it probably won't matter.

The resolution is alternatively available through StereoParams.Load(int2(2, 0)).xy, which is obtained using a different technique again and should give you the resolution that the monitor is being driven at by the card. This is probably always the same as res_width/height when get_resolution_from=swap_chain is in use (but I'm not 100% certain of that - games do too many weird things).

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 02/23/2016 01:10 PM   
[s]I don't know why, but cache_shaders=1 has no longer any effect. I don't see any bins in the shaders folder.[/s] Ignore that. It's just me beeing stupid.
I don't know why, but cache_shaders=1 has no longer any effect. I don't see any bins in the shaders folder.

Ignore that. It's just me beeing stupid.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/26/2016 12:39 PM   
[size="M"][center][color="orange"]3DMigoto 1.2.32 is out:[/color] [url]https://github.com/bo3b/3Dmigoto/releases[/url][/center][/size] This release is primarily aimed at improving support for CustomShaders to make the side-by-side and top-and-bottom output mode custom shader more universal. - The custom SBS / TAB shader is included in this release, but is not yet enabled by default (while it undergoes more testing) - uncomment the line in the [Present] section to enable then use F11 to switch modes. - The following options are added to CustomShader sections to allow the rasterizer state to be overridden: fill ("solid" / "wireframe"), cull ("none", "front", "back"), front ("clockwise", "counterclockwise"), depth_bias, depth_bias_clamp, slope_scaled_depth_bias, depth_clip_enable, scissor_enable, multisample_enable, antialiased_line_enable These options correspond to those documented on [url=https://msdn.microsoft.com/en-us/library/windows/desktop/ff476198(v=vs.85).aspx]this MSDN article[/url]. Like the OM blend state, overriding any one of these will override them all back to the defaults from DX, and there is no provision to merge these with any existing state. The most useful option when injecting a full-screen shader is likely to be cull=none so that you don't have to worry about whether the game is using clockwise or counter-clockwise ordering to signify front-facing surfaces, or which is being culled. - A "topology" option is added to CustomShader sections to define the vertex topology, such as "triangle_strip", "triangle_list", etc. The options correspond to those documented [url=https://msdn.microsoft.com/en-us/library/windows/desktop/ff476189(v=vs.85).aspx]here[/url]. - CustomShader sections will now automatically back up and restore all render targets, depth/stencil targets, UAVs bound to pixel (not compute) shaders and viewports that were bound when they were called. This largely eliminates the need to back these up into custom resources manually, and solves certain complications that could arise if a pixel shader was using UAVs. Textures are not backed up. - Each shader type in a CustomShader section can now be set to "null" to explicitly unbind it from the pipeline. This is most useful to ensure that there are no tesselation or geometry shaders still bound. This must be done explicitly, which allows these sections to continue to inherit the state from the game if desired (e.g. as I did in The Witness). - Resource copying has gained a "set_viewport" keyword, which sets the view-port to the dimensions of the resource being copied, which ensures that it can be drawn to if used as a render target (necessary for custom shaders to work in MGSV from the present call). - Resource copying has gained a "no_view_cache" keyword, which disables caching any view created through that operation. This is necessary to eliminate a glitch in Mad Max that occurs if a render target view of the back buffer exists during a certain point of it's initialisation. This release also includes some bug fixes: - Fixes an issue creating depth/stencil views through resource copying - Fixes the placement of the overlay in some games (e.g. MGSV)


This release is primarily aimed at improving support for CustomShaders to make the side-by-side and top-and-bottom output mode custom shader more universal.

- The custom SBS / TAB shader is included in this release, but is not yet enabled by default (while it undergoes more testing) - uncomment the line in the [Present] section to enable then use F11 to switch modes.

- The following options are added to CustomShader sections to allow the rasterizer state to be overridden:

fill ("solid" / "wireframe"), cull ("none", "front", "back"), front ("clockwise", "counterclockwise"), depth_bias, depth_bias_clamp, slope_scaled_depth_bias, depth_clip_enable, scissor_enable, multisample_enable, antialiased_line_enable

These options correspond to those documented on this MSDN article. Like the OM blend state, overriding any one of these will override them all back to the defaults from DX, and there is no provision to merge these with any existing state. The most useful option when injecting a full-screen shader is likely to be cull=none so that you don't have to worry about whether the game is using clockwise or counter-clockwise ordering to signify front-facing surfaces, or which is being culled.

- A "topology" option is added to CustomShader sections to define the vertex topology, such as "triangle_strip", "triangle_list", etc. The options correspond to those documented here.

- CustomShader sections will now automatically back up and restore all render targets, depth/stencil targets, UAVs bound to pixel (not compute) shaders and viewports that were bound when they were called. This largely eliminates the need to back these up into custom resources manually, and solves certain complications that could arise if a pixel shader was using UAVs. Textures are not backed up.

- Each shader type in a CustomShader section can now be set to "null" to explicitly unbind it from the pipeline. This is most useful to ensure that there are no tesselation or geometry shaders still bound. This must be done explicitly, which allows these sections to continue to inherit the state from the game if desired (e.g. as I did in The Witness).

- Resource copying has gained a "set_viewport" keyword, which sets the view-port to the dimensions of the resource being copied, which ensures that it can be drawn to if used as a render target (necessary for custom shaders to work in MGSV from the present call).

- Resource copying has gained a "no_view_cache" keyword, which disables caching any view created through that operation. This is necessary to eliminate a glitch in Mad Max that occurs if a render target view of the back buffer exists during a certain point of it's initialisation.

This release also includes some bug fixes:
- Fixes an issue creating depth/stencil views through resource copying
- Fixes the placement of the overlay in some games (e.g. MGSV)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 02/27/2016 08:57 PM   
Hi DarkStarSword, Really awesome update there! I'm a bit out of the loop with SBS support added in the latest 3DMigoto. I am still working on Rise Of Tomb Raider fix. The fix started with 3DMigoto v.1.2.27. Is there a reason to update to this version? It is posible some things are not compatible? Or should the upgrade just be a process of copy/paste the new DLL?:) I figured you are the best person to ask this:)
Hi DarkStarSword,

Really awesome update there! I'm a bit out of the loop with SBS support added in the latest 3DMigoto.
I am still working on Rise Of Tomb Raider fix. The fix started with 3DMigoto v.1.2.27.

Is there a reason to update to this version? It is posible some things are not compatible? Or should the upgrade just be a process of copy/paste the new DLL?:) I figured you are the best person to ask this:)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 02/27/2016 09:29 PM   
Would someone please take a look at that vertex shader below and try to help me to understand why the car models exploded after dumping that shader :) ? Also, compiling that shader takes approximately 2 seconds. [img]http://i.imgur.com/DdKvyTd.jpg[/img] [code]// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016 cbuffer _Globals : register(b0) { float4x4 model : packoffset(c0); float4x4 modelViewProj : packoffset(c4); float4x4 prevViewProj : packoffset(c8); float4x4 prevModel : packoffset(c12); float4x4 PSSGWorldToLocalMatrix : packoffset(c16); float4 PartsState : packoffset(c20); float4 PartsState2 : packoffset(c21); float4 PartsState3 : packoffset(c22); float4 PartsState4 : packoffset(c23); float4 Parts : packoffset(c24); float4 Parts2 : packoffset(c25); float4 Parts3 : packoffset(c26); float4 Parts4 : packoffset(c27); float PartStateDefault : packoffset(c28); float3 wobble : packoffset(c28.y); float4 VDParts : packoffset(c29); float4 VDParts2 : packoffset(c30); float4 VDParts3 : packoffset(c31); float4 VDParts4 : packoffset(c32); float4 VDPartsState : packoffset(c33); float4 VDPartsState2 : packoffset(c34); float4 VDPartsState3 : packoffset(c35); float4 VDPartsState4 : packoffset(c36); float4 outbreak_vs_params1 : packoffset(c37); float4 outbreak_vs_params2 : packoffset(c38); float outbreak_vs_params3 : packoffset(c39); float dirtLevel : packoffset(c39.y); float4 mudLevel : packoffset(c40); float WaterCleanHeight : packoffset(c41); float CleanedDustValue : packoffset(c41.y); float CleanedMudValue : packoffset(c41.z); float4 ShadowDepth : packoffset(c42); float4 SlopeBiasVector : packoffset(c43); } cbuffer CameraParamsConstantBuffer : register(b3) { float4x4 projection : packoffset(c0); float4x4 viewProjection : packoffset(c4); row_major float3x4 view : packoffset(c8); row_major float3x4 viewI : packoffset(c11); float3 eyePositionWS : packoffset(c14); float4x4 inverseProj : packoffset(c15); bool leftEye : packoffset(c19); bool padding3[3] : packoffset(c20); } cbuffer PerFrameConstantBuffer : register(b1) { float4 colorBufferEncodingParams : packoffset(c0); float4 envMapEncodingParams : packoffset(c1); float4 velocityEncodingParams : packoffset(c2); float4 snowEffectsParam2 : packoffset(c3); float4 sunDirectionAndTime : packoffset(c4); float4 sunColour : packoffset(c5); float4 skylightColour : packoffset(c6); float4 ambientOcclusionScales : packoffset(c7); float4 backlightColour : packoffset(c8); float4 specularScales : packoffset(c9); float3 specularDirection : packoffset(c10); float4 specularColourAndMultiplier : packoffset(c11); float4 fogColour : packoffset(c12); float4 fogParams : packoffset(c13); float4 hazeParams : packoffset(c14); float4 hazeParams2 : packoffset(c15); float4 nightLightmapParam1 : packoffset(c16); float4 nightLightmapParam2 : packoffset(c17); float4 wetLightingParam : packoffset(c18); float4 snowEffectsParam : packoffset(c19); float4 ambientColour : packoffset(c20); float4 shadowBlend : packoffset(c21); float4 maskParams : packoffset(c22); float4 deferredSpecularParams : packoffset(c23); } cbuffer MatrixPaletteConstantBuffer : register(b4) { row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float3 v0 : POSITION0, float4 v1 : COLOR0, float3 v2 : NORMAL0, float4 v3 : TEXCOORD0, float3 v4 : TANGENT0, float3 v5 : BINORMAL0, float v6 : BLENDINDICES0, out float4 o0 : SV_Position0, out float4 o1 : COLOR0, out float4 o2 : COLOR1, out float4 o3 : TEXCOORD0, out float4 o4 : TEXCOORD1, out float4 o5 : TEXCOORD2, out float4 o6 : TEXCOORD4, out float4 o7 : TEXCOORD5, out float4 o8 : TEXCOORD6) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.x = (uint)v6.x; r0.x = (uint)r0.x; r0.x = (int)r0.x; r0.x = (int)r0.x * 3; r0.x = (int)r0.x; r0.x = (uint)r0.x; r0.x = (int)r0.x * 3; r1.xyz = v0.xyz; r1.w = 1; r2.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12_m13, r1.xyzw); r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy; r2.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02_m03, r1.xyzw); r2.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22_m23, r1.xyzw); r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw; r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw; r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw; o0.xyzw = r1.xyzw; o8.xyzw = r1.xyzw; o1.xy = float2(1,1) + -v1.xy; r0.y = mudLevel.x + mudLevel.y; r0.y = mudLevel.z + r0.y; r0.y = mudLevel.w + r0.y; r0.y = saturate(0.25 * r0.y); r0.z = -CleanedMudValue + r0.y; r0.w = PSSGWorldToLocalMatrix._m11 * r2.y; r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w; r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w; r0.w = PSSGWorldToLocalMatrix._m13 + r0.w; r1.x = 0.0700000003 + r0.w; r0.w = cmp(r0.w < WaterCleanHeight); r1.x = -WaterCleanHeight + r1.x; r1.x = saturate(14.2857141 * r1.x); r0.z = r1.x * r0.z + CleanedMudValue; o1.w = r0.w ? r0.z : r0.y; r0.y = saturate(dirtLevel); r0.z = -CleanedDustValue + r0.y; r0.z = r1.x * r0.z + CleanedDustValue; o1.z = r0.w ? r0.z : r0.y; r0.yzw = hazeParams2.xyz + -hazeParams.xyz; r1.xyz = -eyePositionWS.xyz + r2.xyz; o3.xyz = r2.xyz; r1.w = dot(r1.xyz, r1.xyz); r1.w = sqrt(r1.w); r1.xyz = r1.xyz / r1.www; r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz)); r1.x = log2(r1.x); r1.x = hazeParams2.w * r1.x; r1.x = exp2(r1.x); r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz; r0.y = 1 / fogParams.z; r0.y = r1.w + -r0.y; r0.z = -30 + r1.w; r0.z = saturate(fogParams.z * r0.z); r1.w = fogParams.w * r0.z; r0.y = max(0, r0.y); r0.y = hazeParams.w * r0.y; r0.y = 1.44269502 * r0.y; r0.y = exp2(r0.y); r2.w = 1 + -r0.y; r1.xyz = fogColour.xyz; r3.xyzw = r2.xyzw + -r1.xyzw; r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw; o2.xyz = r1.xyz * r1.www; o2.w = 1 + -r1.w; o3.w = 1; o4.w = 0; o4.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v2.xyz); o4.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v2.xyz); o4.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v2.xyz); o5.xyzw = v3.xyzw; o6.w = 0; o6.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v4.xyz); o6.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v4.xyz); o6.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v4.xyz); o7.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v5.xyz); o7.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v5.xyz); o7.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v5.xyz); return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789 // // using 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016 // // // Buffer Definitions: // // cbuffer _Globals // { // // float4x4 model; // Offset: 0 Size: 64 [unused] // float4x4 modelViewProj; // Offset: 64 Size: 64 [unused] // float4x4 prevViewProj; // Offset: 128 Size: 64 [unused] // float4x4 prevModel; // Offset: 192 Size: 64 [unused] // float4x4 PSSGWorldToLocalMatrix; // Offset: 256 Size: 64 // float4 PartsState; // Offset: 320 Size: 16 [unused] // float4 PartsState2; // Offset: 336 Size: 16 [unused] // float4 PartsState3; // Offset: 352 Size: 16 [unused] // float4 PartsState4; // Offset: 368 Size: 16 [unused] // float4 Parts; // Offset: 384 Size: 16 [unused] // float4 Parts2; // Offset: 400 Size: 16 [unused] // float4 Parts3; // Offset: 416 Size: 16 [unused] // float4 Parts4; // Offset: 432 Size: 16 [unused] // float PartStateDefault; // Offset: 448 Size: 4 [unused] // float3 wobble; // Offset: 452 Size: 12 [unused] // float4 VDParts; // Offset: 464 Size: 16 [unused] // float4 VDParts2; // Offset: 480 Size: 16 [unused] // float4 VDParts3; // Offset: 496 Size: 16 [unused] // float4 VDParts4; // Offset: 512 Size: 16 [unused] // float4 VDPartsState; // Offset: 528 Size: 16 [unused] // float4 VDPartsState2; // Offset: 544 Size: 16 [unused] // float4 VDPartsState3; // Offset: 560 Size: 16 [unused] // float4 VDPartsState4; // Offset: 576 Size: 16 [unused] // float4 outbreak_vs_params1; // Offset: 592 Size: 16 [unused] // float4 outbreak_vs_params2; // Offset: 608 Size: 16 [unused] // float outbreak_vs_params3; // Offset: 624 Size: 4 [unused] // float dirtLevel; // Offset: 628 Size: 4 // float4 mudLevel; // Offset: 640 Size: 16 // float WaterCleanHeight; // Offset: 656 Size: 4 // float CleanedDustValue; // Offset: 660 Size: 4 // float CleanedMudValue; // Offset: 664 Size: 4 // float4 ShadowDepth; // Offset: 672 Size: 16 [unused] // float4 SlopeBiasVector; // Offset: 688 Size: 16 [unused] // // } // // cbuffer CameraParamsConstantBuffer // { // // float4x4 projection; // Offset: 0 Size: 64 [unused] // float4x4 viewProjection; // Offset: 64 Size: 64 // row_major float3x4 view; // Offset: 128 Size: 48 [unused] // row_major float3x4 viewI; // Offset: 176 Size: 48 [unused] // float3 eyePositionWS; // Offset: 224 Size: 12 // float4x4 inverseProj; // Offset: 240 Size: 64 [unused] // bool leftEye; // Offset: 304 Size: 4 [unused] // bool padding3[3]; // Offset: 320 Size: 36 [unused] // // } // // cbuffer PerFrameConstantBuffer // { // // float4 colorBufferEncodingParams; // Offset: 0 Size: 16 [unused] // float4 envMapEncodingParams; // Offset: 16 Size: 16 [unused] // float4 velocityEncodingParams; // Offset: 32 Size: 16 [unused] // float4 snowEffectsParam2; // Offset: 48 Size: 16 [unused] // float4 sunDirectionAndTime; // Offset: 64 Size: 16 // float4 sunColour; // Offset: 80 Size: 16 [unused] // float4 skylightColour; // Offset: 96 Size: 16 [unused] // float4 ambientOcclusionScales; // Offset: 112 Size: 16 [unused] // float4 backlightColour; // Offset: 128 Size: 16 [unused] // float4 specularScales; // Offset: 144 Size: 16 [unused] // float3 specularDirection; // Offset: 160 Size: 12 [unused] // float4 specularColourAndMultiplier;// Offset: 176 Size: 16 [unused] // float4 fogColour; // Offset: 192 Size: 16 // float4 fogParams; // Offset: 208 Size: 16 // float4 hazeParams; // Offset: 224 Size: 16 // float4 hazeParams2; // Offset: 240 Size: 16 // float4 nightLightmapParam1; // Offset: 256 Size: 16 [unused] // float4 nightLightmapParam2; // Offset: 272 Size: 16 [unused] // float4 wetLightingParam; // Offset: 288 Size: 16 [unused] // float4 snowEffectsParam; // Offset: 304 Size: 16 [unused] // float4 ambientColour; // Offset: 320 Size: 16 [unused] // float4 shadowBlend; // Offset: 336 Size: 16 [unused] // float4 maskParams; // Offset: 352 Size: 16 [unused] // float4 deferredSpecularParams; // Offset: 368 Size: 16 [unused] // // } // // cbuffer MatrixPaletteConstantBuffer // { // // row_major float3x4 PSSGPaletteMatricies[50];// Offset: 0 Size: 2400 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // _Globals cbuffer NA NA 0 1 // PerFrameConstantBuffer cbuffer NA NA 1 1 // CameraParamsConstantBuffer cbuffer NA NA 3 1 // MatrixPaletteConstantBuffer cbuffer NA NA 4 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyz 0 NONE float xyz // COLOR 0 xyzw 1 NONE float xy // NORMAL 0 xyz 2 NONE float xyz // TEXCOORD 0 xyzw 3 NONE float xyzw // TANGENT 0 xyz 4 NONE float xyz // BINORMAL 0 xyz 5 NONE float xyz // BLENDINDICES 0 x 6 NONE float x // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float xyzw // TEXCOORD 0 xyzw 3 NONE float xyzw // TEXCOORD 1 xyzw 4 NONE float xyzw // TEXCOORD 2 xyzw 5 NONE float xyzw // TEXCOORD 4 xyzw 6 NONE float xyzw // TEXCOORD 5 xyzw 7 NONE float xyz // TEXCOORD 6 xyzw 8 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[42], immediateIndexed dcl_constantbuffer cb3[15], immediateIndexed dcl_constantbuffer cb1[16], immediateIndexed dcl_constantbuffer cb4[150], dynamicIndexed dcl_input v0.xyz dcl_input v1.xy dcl_input v2.xyz dcl_input v3.xyzw dcl_input v4.xyz dcl_input v5.xyz dcl_input v6.x dcl_output_siv o0.xyzw, position dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.xyzw dcl_output o7.xyz dcl_output o8.xyzw dcl_temps 4 ftou r0.x, v6.x utof r0.x, r0.x ftoi r0.x, r0.x imul null, r0.x, r0.x, l(3) itof r0.x, r0.x ftou r0.x, r0.x imul null, r0.x, r0.x, l(3) mov r1.xyz, v0.xyzx mov r1.w, l(1.000000) dp4 r2.y, cb4[r0.x + 1].xyzw, r1.xyzw mul r3.xyzw, r2.yyyy, cb3[5].xyzw dp4 r2.x, cb4[r0.x + 0].xyzw, r1.xyzw dp4 r2.z, cb4[r0.x + 2].xyzw, r1.xyzw mad r1.xyzw, cb3[4].xyzw, r2.xxxx, r3.xyzw mad r1.xyzw, cb3[6].xyzw, r2.zzzz, r1.xyzw add r1.xyzw, r1.xyzw, cb3[7].xyzw mov o0.xyzw, r1.xyzw mov o8.xyzw, r1.xyzw add o1.xy, -v1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) add r0.y, cb0[40].y, cb0[40].x add r0.y, r0.y, cb0[40].z add r0.y, r0.y, cb0[40].w mul_sat r0.y, r0.y, l(0.250000) add r0.z, r0.y, -cb0[41].z mul r0.w, r2.y, cb0[17].y mad r0.w, cb0[16].y, r2.x, r0.w mad r0.w, cb0[18].y, r2.z, r0.w add r0.w, r0.w, cb0[19].y add r1.x, r0.w, l(0.070000) lt r0.w, r0.w, cb0[41].x add r1.x, r1.x, -cb0[41].x mul_sat r1.x, r1.x, l(14.285714) mad r0.z, r1.x, r0.z, cb0[41].z movc o1.w, r0.w, r0.z, r0.y mov_sat r0.y, cb0[39].y add r0.z, r0.y, -cb0[41].y mad r0.z, r1.x, r0.z, cb0[41].y movc o1.z, r0.w, r0.z, r0.y add r0.yzw, -cb1[14].xxyz, cb1[15].xxyz add r1.xyz, r2.xyzx, -cb3[14].xyzx mov o3.xyz, r2.xyzx dp3 r1.w, r1.xyzx, r1.xyzx sqrt r1.w, r1.w div r1.xyz, r1.xyzx, r1.wwww dp3_sat r1.x, r1.xyzx, cb1[4].xyzx log r1.x, r1.x mul r1.x, r1.x, cb1[15].w exp r1.x, r1.x mad r2.xyz, r1.xxxx, r0.yzwy, cb1[14].xyzx div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[13].z add r0.y, -r0.y, r1.w add r0.z, r1.w, l(-30.000000) mul_sat r0.z, r0.z, cb1[13].z mul r1.w, r0.z, cb1[13].w max r0.y, r0.y, l(0.000000) mul r0.y, r0.y, cb1[14].w mul r0.y, r0.y, l(1.442695) exp r0.y, r0.y add r2.w, -r0.y, l(1.000000) mov r1.xyz, cb1[12].xyzx add r3.xyzw, -r1.xyzw, r2.xyzw mad r1.xyzw, r2.wwww, r3.xyzw, r1.xyzw mul o2.xyz, r1.wwww, r1.xyzx add o2.w, -r1.w, l(1.000000) mov o3.w, l(1.000000) mov o4.w, l(0) dp3 o4.x, cb4[r0.x + 0].xyzx, v2.xyzx dp3 o4.y, cb4[r0.x + 1].xyzx, v2.xyzx dp3 o4.z, cb4[r0.x + 2].xyzx, v2.xyzx mov o5.xyzw, v3.xyzw mov o6.w, l(0) dp3 o6.x, cb4[r0.x + 0].xyzx, v4.xyzx dp3 o6.y, cb4[r0.x + 1].xyzx, v4.xyzx dp3 o6.z, cb4[r0.x + 2].xyzx, v4.xyzx dp3 o7.x, cb4[r0.x + 0].xyzx, v5.xyzx dp3 o7.y, cb4[r0.x + 1].xyzx, v5.xyzx dp3 o7.z, cb4[r0.x + 2].xyzx, v5.xyzx ret // Approximately 78 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] EDIT: I've identified a bug and fixed the indexing it but seems like there is still something else wrong. [code]// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016 cbuffer _Globals : register(b0) { float4x4 model : packoffset(c0); float4x4 modelViewProj : packoffset(c4); float4x4 prevViewProj : packoffset(c8); float4x4 prevModel : packoffset(c12); float4x4 PSSGWorldToLocalMatrix : packoffset(c16); float4 PartsState : packoffset(c20); float4 PartsState2 : packoffset(c21); float4 PartsState3 : packoffset(c22); float4 PartsState4 : packoffset(c23); float4 Parts : packoffset(c24); float4 Parts2 : packoffset(c25); float4 Parts3 : packoffset(c26); float4 Parts4 : packoffset(c27); float PartStateDefault : packoffset(c28); float3 wobble : packoffset(c28.y); float4 VDParts : packoffset(c29); float4 VDParts2 : packoffset(c30); float4 VDParts3 : packoffset(c31); float4 VDParts4 : packoffset(c32); float4 VDPartsState : packoffset(c33); float4 VDPartsState2 : packoffset(c34); float4 VDPartsState3 : packoffset(c35); float4 VDPartsState4 : packoffset(c36); float4 outbreak_vs_params1 : packoffset(c37); float4 outbreak_vs_params2 : packoffset(c38); float outbreak_vs_params3 : packoffset(c39); float dirtLevel : packoffset(c39.y); float4 mudLevel : packoffset(c40); float WaterCleanHeight : packoffset(c41); float CleanedDustValue : packoffset(c41.y); float CleanedMudValue : packoffset(c41.z); float4 ShadowDepth : packoffset(c42); float4 SlopeBiasVector : packoffset(c43); } cbuffer CameraParamsConstantBuffer : register(b3) { float4x4 projection : packoffset(c0); float4x4 viewProjection : packoffset(c4); row_major float3x4 view : packoffset(c8); row_major float3x4 viewI : packoffset(c11); float3 eyePositionWS : packoffset(c14); float4x4 inverseProj : packoffset(c15); bool leftEye : packoffset(c19); bool padding3[3] : packoffset(c20); } cbuffer PerFrameConstantBuffer : register(b1) { float4 colorBufferEncodingParams : packoffset(c0); float4 envMapEncodingParams : packoffset(c1); float4 velocityEncodingParams : packoffset(c2); float4 snowEffectsParam2 : packoffset(c3); float4 sunDirectionAndTime : packoffset(c4); float4 sunColour : packoffset(c5); float4 skylightColour : packoffset(c6); float4 ambientOcclusionScales : packoffset(c7); float4 backlightColour : packoffset(c8); float4 specularScales : packoffset(c9); float3 specularDirection : packoffset(c10); float4 specularColourAndMultiplier : packoffset(c11); float4 fogColour : packoffset(c12); float4 fogParams : packoffset(c13); float4 hazeParams : packoffset(c14); float4 hazeParams2 : packoffset(c15); float4 nightLightmapParam1 : packoffset(c16); float4 nightLightmapParam2 : packoffset(c17); float4 wetLightingParam : packoffset(c18); float4 snowEffectsParam : packoffset(c19); float4 ambientColour : packoffset(c20); float4 shadowBlend : packoffset(c21); float4 maskParams : packoffset(c22); float4 deferredSpecularParams : packoffset(c23); } cbuffer MatrixPaletteConstantBuffer : register(b4) { row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float3 v0 : POSITION0, float4 v1 : COLOR0, float3 v2 : NORMAL0, float4 v3 : TEXCOORD0, float3 v4 : TANGENT0, float3 v5 : BINORMAL0, float v6 : BLENDINDICES0, out float4 o0 : SV_Position0, out float4 o1 : COLOR0, out float4 o2 : COLOR1, out float4 o3 : TEXCOORD0, out float4 o4 : TEXCOORD1, out float4 o5 : TEXCOORD2, out float4 o6 : TEXCOORD4, out float4 o7 : TEXCOORD5, out float4 o8 : TEXCOORD6) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.x = (uint)v6.x; r0.x = (uint)r0.x; r0.x = (int)r0.x; r0.x = (int)r0.x * 3; r0.x = (int)r0.x; r0.x = (uint)r0.x; r0.x = (int)r0.x * 3; r1.xyz = v0.xyz; r1.w = 1; r2.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02_m03, r1.xyzw); r2.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12_m13, r1.xyzw); r2.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22_m23, r1.xyzw); r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy; r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw; r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw; r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw; o0.xyzw = r1.xyzw; o8.xyzw = r1.xyzw; o1.xy = float2(1,1) + -v1.xy; r0.y = mudLevel.x + mudLevel.y; r0.y = mudLevel.z + r0.y; r0.y = mudLevel.w + r0.y; r0.y = saturate(0.25 * r0.y); r0.z = -CleanedMudValue + r0.y; r0.w = PSSGWorldToLocalMatrix._m11 * r2.y; r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w; r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w; r0.w = PSSGWorldToLocalMatrix._m13 + r0.w; r1.x = 0.0700000003 + r0.w; r0.w = cmp(r0.w < WaterCleanHeight); r1.x = -WaterCleanHeight + r1.x; r1.x = saturate(14.2857141 * r1.x); r0.z = r1.x * r0.z + CleanedMudValue; o1.w = r0.w ? r0.z : r0.y; r0.y = saturate(dirtLevel); r0.z = -CleanedDustValue + r0.y; r0.z = r1.x * r0.z + CleanedDustValue; o1.z = r0.w ? r0.z : r0.y; r0.yzw = hazeParams2.xyz + -hazeParams.xyz; r1.xyz = -eyePositionWS.xyz + r2.xyz; o3.xyz = r2.xyz; r1.w = dot(r1.xyz, r1.xyz); r1.w = sqrt(r1.w); r1.xyz = r1.xyz / r1.www; r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz)); r1.x = log2(r1.x); r1.x = hazeParams2.w * r1.x; r1.x = exp2(r1.x); r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz; r0.y = 1 / fogParams.z; r0.y = r1.w + -r0.y; r0.z = -30 + r1.w; r0.z = saturate(fogParams.z * r0.z); r1.w = fogParams.w * r0.z; r0.y = max(0, r0.y); r0.y = hazeParams.w * r0.y; r0.y = 1.44269502 * r0.y; r0.y = exp2(r0.y); r2.w = 1 + -r0.y; r1.xyz = fogColour.xyz; r3.xyzw = r2.xyzw + -r1.xyzw; r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw; o2.xyz = r1.xyz * r1.www; o2.w = 1 + -r1.w; o3.w = 1; o4.w = 0; o4.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v2.xyz); o4.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v2.xyz); o4.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v2.xyz); o5.xyzw = v3.xyzw; o6.w = 0; o6.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v4.xyz); o6.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v4.xyz); o6.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v4.xyz); o7.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v5.xyz); o7.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v5.xyz); o7.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v5.xyz); return; }[/code]
Would someone please take a look at that vertex shader below and try to help me to understand why the car models exploded after dumping that shader :) ?

Also, compiling that shader takes approximately 2 seconds.

Image

// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016

cbuffer _Globals : register(b0)
{
float4x4 model : packoffset(c0);
float4x4 modelViewProj : packoffset(c4);
float4x4 prevViewProj : packoffset(c8);
float4x4 prevModel : packoffset(c12);
float4x4 PSSGWorldToLocalMatrix : packoffset(c16);
float4 PartsState : packoffset(c20);
float4 PartsState2 : packoffset(c21);
float4 PartsState3 : packoffset(c22);
float4 PartsState4 : packoffset(c23);
float4 Parts : packoffset(c24);
float4 Parts2 : packoffset(c25);
float4 Parts3 : packoffset(c26);
float4 Parts4 : packoffset(c27);
float PartStateDefault : packoffset(c28);
float3 wobble : packoffset(c28.y);
float4 VDParts : packoffset(c29);
float4 VDParts2 : packoffset(c30);
float4 VDParts3 : packoffset(c31);
float4 VDParts4 : packoffset(c32);
float4 VDPartsState : packoffset(c33);
float4 VDPartsState2 : packoffset(c34);
float4 VDPartsState3 : packoffset(c35);
float4 VDPartsState4 : packoffset(c36);
float4 outbreak_vs_params1 : packoffset(c37);
float4 outbreak_vs_params2 : packoffset(c38);
float outbreak_vs_params3 : packoffset(c39);
float dirtLevel : packoffset(c39.y);
float4 mudLevel : packoffset(c40);
float WaterCleanHeight : packoffset(c41);
float CleanedDustValue : packoffset(c41.y);
float CleanedMudValue : packoffset(c41.z);
float4 ShadowDepth : packoffset(c42);
float4 SlopeBiasVector : packoffset(c43);
}

cbuffer CameraParamsConstantBuffer : register(b3)
{
float4x4 projection : packoffset(c0);
float4x4 viewProjection : packoffset(c4);
row_major float3x4 view : packoffset(c8);
row_major float3x4 viewI : packoffset(c11);
float3 eyePositionWS : packoffset(c14);
float4x4 inverseProj : packoffset(c15);
bool leftEye : packoffset(c19);
bool padding3[3] : packoffset(c20);
}

cbuffer PerFrameConstantBuffer : register(b1)
{
float4 colorBufferEncodingParams : packoffset(c0);
float4 envMapEncodingParams : packoffset(c1);
float4 velocityEncodingParams : packoffset(c2);
float4 snowEffectsParam2 : packoffset(c3);
float4 sunDirectionAndTime : packoffset(c4);
float4 sunColour : packoffset(c5);
float4 skylightColour : packoffset(c6);
float4 ambientOcclusionScales : packoffset(c7);
float4 backlightColour : packoffset(c8);
float4 specularScales : packoffset(c9);
float3 specularDirection : packoffset(c10);
float4 specularColourAndMultiplier : packoffset(c11);
float4 fogColour : packoffset(c12);
float4 fogParams : packoffset(c13);
float4 hazeParams : packoffset(c14);
float4 hazeParams2 : packoffset(c15);
float4 nightLightmapParam1 : packoffset(c16);
float4 nightLightmapParam2 : packoffset(c17);
float4 wetLightingParam : packoffset(c18);
float4 snowEffectsParam : packoffset(c19);
float4 ambientColour : packoffset(c20);
float4 shadowBlend : packoffset(c21);
float4 maskParams : packoffset(c22);
float4 deferredSpecularParams : packoffset(c23);
}

cbuffer MatrixPaletteConstantBuffer : register(b4)
{
row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float3 v0 : POSITION0,
float4 v1 : COLOR0,
float3 v2 : NORMAL0,
float4 v3 : TEXCOORD0,
float3 v4 : TANGENT0,
float3 v5 : BINORMAL0,
float v6 : BLENDINDICES0,
out float4 o0 : SV_Position0,
out float4 o1 : COLOR0,
out float4 o2 : COLOR1,
out float4 o3 : TEXCOORD0,
out float4 o4 : TEXCOORD1,
out float4 o5 : TEXCOORD2,
out float4 o6 : TEXCOORD4,
out float4 o7 : TEXCOORD5,
out float4 o8 : TEXCOORD6)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = (uint)v6.x;
r0.x = (uint)r0.x;
r0.x = (int)r0.x;
r0.x = (int)r0.x * 3;
r0.x = (int)r0.x;
r0.x = (uint)r0.x;
r0.x = (int)r0.x * 3;
r1.xyz = v0.xyz;
r1.w = 1;
r2.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12_m13, r1.xyzw);
r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy;
r2.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02_m03, r1.xyzw);
r2.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22_m23, r1.xyzw);
r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw;
r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw;
r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw;
o0.xyzw = r1.xyzw;
o8.xyzw = r1.xyzw;
o1.xy = float2(1,1) + -v1.xy;
r0.y = mudLevel.x + mudLevel.y;
r0.y = mudLevel.z + r0.y;
r0.y = mudLevel.w + r0.y;
r0.y = saturate(0.25 * r0.y);
r0.z = -CleanedMudValue + r0.y;
r0.w = PSSGWorldToLocalMatrix._m11 * r2.y;
r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w;
r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w;
r0.w = PSSGWorldToLocalMatrix._m13 + r0.w;
r1.x = 0.0700000003 + r0.w;
r0.w = cmp(r0.w < WaterCleanHeight);
r1.x = -WaterCleanHeight + r1.x;
r1.x = saturate(14.2857141 * r1.x);
r0.z = r1.x * r0.z + CleanedMudValue;
o1.w = r0.w ? r0.z : r0.y;
r0.y = saturate(dirtLevel);
r0.z = -CleanedDustValue + r0.y;
r0.z = r1.x * r0.z + CleanedDustValue;
o1.z = r0.w ? r0.z : r0.y;
r0.yzw = hazeParams2.xyz + -hazeParams.xyz;
r1.xyz = -eyePositionWS.xyz + r2.xyz;
o3.xyz = r2.xyz;
r1.w = dot(r1.xyz, r1.xyz);
r1.w = sqrt(r1.w);
r1.xyz = r1.xyz / r1.www;
r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz));
r1.x = log2(r1.x);
r1.x = hazeParams2.w * r1.x;
r1.x = exp2(r1.x);
r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz;
r0.y = 1 / fogParams.z;
r0.y = r1.w + -r0.y;
r0.z = -30 + r1.w;
r0.z = saturate(fogParams.z * r0.z);
r1.w = fogParams.w * r0.z;
r0.y = max(0, r0.y);
r0.y = hazeParams.w * r0.y;
r0.y = 1.44269502 * r0.y;
r0.y = exp2(r0.y);
r2.w = 1 + -r0.y;
r1.xyz = fogColour.xyz;
r3.xyzw = r2.xyzw + -r1.xyzw;
r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw;
o2.xyz = r1.xyz * r1.www;
o2.w = 1 + -r1.w;
o3.w = 1;
o4.w = 0;
o4.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v2.xyz);
o4.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v2.xyz);
o4.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v2.xyz);
o5.xyzw = v3.xyzw;
o6.w = 0;
o6.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v4.xyz);
o6.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v4.xyz);
o6.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v4.xyz);
o7.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v5.xyz);
o7.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v5.xyz);
o7.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v5.xyz);
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
// using 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016
//
//
// Buffer Definitions:
//
// cbuffer _Globals
// {
//
// float4x4 model; // Offset: 0 Size: 64 [unused]
// float4x4 modelViewProj; // Offset: 64 Size: 64 [unused]
// float4x4 prevViewProj; // Offset: 128 Size: 64 [unused]
// float4x4 prevModel; // Offset: 192 Size: 64 [unused]
// float4x4 PSSGWorldToLocalMatrix; // Offset: 256 Size: 64
// float4 PartsState; // Offset: 320 Size: 16 [unused]
// float4 PartsState2; // Offset: 336 Size: 16 [unused]
// float4 PartsState3; // Offset: 352 Size: 16 [unused]
// float4 PartsState4; // Offset: 368 Size: 16 [unused]
// float4 Parts; // Offset: 384 Size: 16 [unused]
// float4 Parts2; // Offset: 400 Size: 16 [unused]
// float4 Parts3; // Offset: 416 Size: 16 [unused]
// float4 Parts4; // Offset: 432 Size: 16 [unused]
// float PartStateDefault; // Offset: 448 Size: 4 [unused]
// float3 wobble; // Offset: 452 Size: 12 [unused]
// float4 VDParts; // Offset: 464 Size: 16 [unused]
// float4 VDParts2; // Offset: 480 Size: 16 [unused]
// float4 VDParts3; // Offset: 496 Size: 16 [unused]
// float4 VDParts4; // Offset: 512 Size: 16 [unused]
// float4 VDPartsState; // Offset: 528 Size: 16 [unused]
// float4 VDPartsState2; // Offset: 544 Size: 16 [unused]
// float4 VDPartsState3; // Offset: 560 Size: 16 [unused]
// float4 VDPartsState4; // Offset: 576 Size: 16 [unused]
// float4 outbreak_vs_params1; // Offset: 592 Size: 16 [unused]
// float4 outbreak_vs_params2; // Offset: 608 Size: 16 [unused]
// float outbreak_vs_params3; // Offset: 624 Size: 4 [unused]
// float dirtLevel; // Offset: 628 Size: 4
// float4 mudLevel; // Offset: 640 Size: 16
// float WaterCleanHeight; // Offset: 656 Size: 4
// float CleanedDustValue; // Offset: 660 Size: 4
// float CleanedMudValue; // Offset: 664 Size: 4
// float4 ShadowDepth; // Offset: 672 Size: 16 [unused]
// float4 SlopeBiasVector; // Offset: 688 Size: 16 [unused]
//
// }
//
// cbuffer CameraParamsConstantBuffer
// {
//
// float4x4 projection; // Offset: 0 Size: 64 [unused]
// float4x4 viewProjection; // Offset: 64 Size: 64
// row_major float3x4 view; // Offset: 128 Size: 48 [unused]
// row_major float3x4 viewI; // Offset: 176 Size: 48 [unused]
// float3 eyePositionWS; // Offset: 224 Size: 12
// float4x4 inverseProj; // Offset: 240 Size: 64 [unused]
// bool leftEye; // Offset: 304 Size: 4 [unused]
// bool padding3[3]; // Offset: 320 Size: 36 [unused]
//
// }
//
// cbuffer PerFrameConstantBuffer
// {
//
// float4 colorBufferEncodingParams; // Offset: 0 Size: 16 [unused]
// float4 envMapEncodingParams; // Offset: 16 Size: 16 [unused]
// float4 velocityEncodingParams; // Offset: 32 Size: 16 [unused]
// float4 snowEffectsParam2; // Offset: 48 Size: 16 [unused]
// float4 sunDirectionAndTime; // Offset: 64 Size: 16
// float4 sunColour; // Offset: 80 Size: 16 [unused]
// float4 skylightColour; // Offset: 96 Size: 16 [unused]
// float4 ambientOcclusionScales; // Offset: 112 Size: 16 [unused]
// float4 backlightColour; // Offset: 128 Size: 16 [unused]
// float4 specularScales; // Offset: 144 Size: 16 [unused]
// float3 specularDirection; // Offset: 160 Size: 12 [unused]
// float4 specularColourAndMultiplier;// Offset: 176 Size: 16 [unused]
// float4 fogColour; // Offset: 192 Size: 16
// float4 fogParams; // Offset: 208 Size: 16
// float4 hazeParams; // Offset: 224 Size: 16
// float4 hazeParams2; // Offset: 240 Size: 16
// float4 nightLightmapParam1; // Offset: 256 Size: 16 [unused]
// float4 nightLightmapParam2; // Offset: 272 Size: 16 [unused]
// float4 wetLightingParam; // Offset: 288 Size: 16 [unused]
// float4 snowEffectsParam; // Offset: 304 Size: 16 [unused]
// float4 ambientColour; // Offset: 320 Size: 16 [unused]
// float4 shadowBlend; // Offset: 336 Size: 16 [unused]
// float4 maskParams; // Offset: 352 Size: 16 [unused]
// float4 deferredSpecularParams; // Offset: 368 Size: 16 [unused]
//
// }
//
// cbuffer MatrixPaletteConstantBuffer
// {
//
// row_major float3x4 PSSGPaletteMatricies[50];// Offset: 0 Size: 2400
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _Globals cbuffer NA NA 0 1
// PerFrameConstantBuffer cbuffer NA NA 1 1
// CameraParamsConstantBuffer cbuffer NA NA 3 1
// MatrixPaletteConstantBuffer cbuffer NA NA 4 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// COLOR 0 xyzw 1 NONE float xy
// NORMAL 0 xyz 2 NONE float xyz
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TANGENT 0 xyz 4 NONE float xyz
// BINORMAL 0 xyz 5 NONE float xyz
// BLENDINDICES 0 x 6 NONE float x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float xyzw
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TEXCOORD 1 xyzw 4 NONE float xyzw
// TEXCOORD 2 xyzw 5 NONE float xyzw
// TEXCOORD 4 xyzw 6 NONE float xyzw
// TEXCOORD 5 xyzw 7 NONE float xyz
// TEXCOORD 6 xyzw 8 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[42], immediateIndexed
dcl_constantbuffer cb3[15], immediateIndexed
dcl_constantbuffer cb1[16], immediateIndexed
dcl_constantbuffer cb4[150], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input v4.xyz
dcl_input v5.xyz
dcl_input v6.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyz
dcl_output o8.xyzw
dcl_temps 4
ftou r0.x, v6.x
utof r0.x, r0.x
ftoi r0.x, r0.x
imul null, r0.x, r0.x, l(3)
itof r0.x, r0.x
ftou r0.x, r0.x
imul null, r0.x, r0.x, l(3)
mov r1.xyz, v0.xyzx
mov r1.w, l(1.000000)
dp4 r2.y, cb4[r0.x + 1].xyzw, r1.xyzw
mul r3.xyzw, r2.yyyy, cb3[5].xyzw
dp4 r2.x, cb4[r0.x + 0].xyzw, r1.xyzw
dp4 r2.z, cb4[r0.x + 2].xyzw, r1.xyzw
mad r1.xyzw, cb3[4].xyzw, r2.xxxx, r3.xyzw
mad r1.xyzw, cb3[6].xyzw, r2.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb3[7].xyzw
mov o0.xyzw, r1.xyzw
mov o8.xyzw, r1.xyzw
add o1.xy, -v1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
add r0.y, cb0[40].y, cb0[40].x
add r0.y, r0.y, cb0[40].z
add r0.y, r0.y, cb0[40].w
mul_sat r0.y, r0.y, l(0.250000)
add r0.z, r0.y, -cb0[41].z
mul r0.w, r2.y, cb0[17].y
mad r0.w, cb0[16].y, r2.x, r0.w
mad r0.w, cb0[18].y, r2.z, r0.w
add r0.w, r0.w, cb0[19].y
add r1.x, r0.w, l(0.070000)
lt r0.w, r0.w, cb0[41].x
add r1.x, r1.x, -cb0[41].x
mul_sat r1.x, r1.x, l(14.285714)
mad r0.z, r1.x, r0.z, cb0[41].z
movc o1.w, r0.w, r0.z, r0.y
mov_sat r0.y, cb0[39].y
add r0.z, r0.y, -cb0[41].y
mad r0.z, r1.x, r0.z, cb0[41].y
movc o1.z, r0.w, r0.z, r0.y
add r0.yzw, -cb1[14].xxyz, cb1[15].xxyz
add r1.xyz, r2.xyzx, -cb3[14].xyzx
mov o3.xyz, r2.xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
sqrt r1.w, r1.w
div r1.xyz, r1.xyzx, r1.wwww
dp3_sat r1.x, r1.xyzx, cb1[4].xyzx
log r1.x, r1.x
mul r1.x, r1.x, cb1[15].w
exp r1.x, r1.x
mad r2.xyz, r1.xxxx, r0.yzwy, cb1[14].xyzx
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[13].z
add r0.y, -r0.y, r1.w
add r0.z, r1.w, l(-30.000000)
mul_sat r0.z, r0.z, cb1[13].z
mul r1.w, r0.z, cb1[13].w
max r0.y, r0.y, l(0.000000)
mul r0.y, r0.y, cb1[14].w
mul r0.y, r0.y, l(1.442695)
exp r0.y, r0.y
add r2.w, -r0.y, l(1.000000)
mov r1.xyz, cb1[12].xyzx
add r3.xyzw, -r1.xyzw, r2.xyzw
mad r1.xyzw, r2.wwww, r3.xyzw, r1.xyzw
mul o2.xyz, r1.wwww, r1.xyzx
add o2.w, -r1.w, l(1.000000)
mov o3.w, l(1.000000)
mov o4.w, l(0)
dp3 o4.x, cb4[r0.x + 0].xyzx, v2.xyzx
dp3 o4.y, cb4[r0.x + 1].xyzx, v2.xyzx
dp3 o4.z, cb4[r0.x + 2].xyzx, v2.xyzx
mov o5.xyzw, v3.xyzw
mov o6.w, l(0)
dp3 o6.x, cb4[r0.x + 0].xyzx, v4.xyzx
dp3 o6.y, cb4[r0.x + 1].xyzx, v4.xyzx
dp3 o6.z, cb4[r0.x + 2].xyzx, v4.xyzx
dp3 o7.x, cb4[r0.x + 0].xyzx, v5.xyzx
dp3 o7.y, cb4[r0.x + 1].xyzx, v5.xyzx
dp3 o7.z, cb4[r0.x + 2].xyzx, v5.xyzx
ret
// Approximately 78 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/



EDIT: I've identified a bug and fixed the indexing it but seems like there is still something else wrong.

// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016

cbuffer _Globals : register(b0)
{
float4x4 model : packoffset(c0);
float4x4 modelViewProj : packoffset(c4);
float4x4 prevViewProj : packoffset(c8);
float4x4 prevModel : packoffset(c12);
float4x4 PSSGWorldToLocalMatrix : packoffset(c16);
float4 PartsState : packoffset(c20);
float4 PartsState2 : packoffset(c21);
float4 PartsState3 : packoffset(c22);
float4 PartsState4 : packoffset(c23);
float4 Parts : packoffset(c24);
float4 Parts2 : packoffset(c25);
float4 Parts3 : packoffset(c26);
float4 Parts4 : packoffset(c27);
float PartStateDefault : packoffset(c28);
float3 wobble : packoffset(c28.y);
float4 VDParts : packoffset(c29);
float4 VDParts2 : packoffset(c30);
float4 VDParts3 : packoffset(c31);
float4 VDParts4 : packoffset(c32);
float4 VDPartsState : packoffset(c33);
float4 VDPartsState2 : packoffset(c34);
float4 VDPartsState3 : packoffset(c35);
float4 VDPartsState4 : packoffset(c36);
float4 outbreak_vs_params1 : packoffset(c37);
float4 outbreak_vs_params2 : packoffset(c38);
float outbreak_vs_params3 : packoffset(c39);
float dirtLevel : packoffset(c39.y);
float4 mudLevel : packoffset(c40);
float WaterCleanHeight : packoffset(c41);
float CleanedDustValue : packoffset(c41.y);
float CleanedMudValue : packoffset(c41.z);
float4 ShadowDepth : packoffset(c42);
float4 SlopeBiasVector : packoffset(c43);
}

cbuffer CameraParamsConstantBuffer : register(b3)
{
float4x4 projection : packoffset(c0);
float4x4 viewProjection : packoffset(c4);
row_major float3x4 view : packoffset(c8);
row_major float3x4 viewI : packoffset(c11);
float3 eyePositionWS : packoffset(c14);
float4x4 inverseProj : packoffset(c15);
bool leftEye : packoffset(c19);
bool padding3[3] : packoffset(c20);
}

cbuffer PerFrameConstantBuffer : register(b1)
{
float4 colorBufferEncodingParams : packoffset(c0);
float4 envMapEncodingParams : packoffset(c1);
float4 velocityEncodingParams : packoffset(c2);
float4 snowEffectsParam2 : packoffset(c3);
float4 sunDirectionAndTime : packoffset(c4);
float4 sunColour : packoffset(c5);
float4 skylightColour : packoffset(c6);
float4 ambientOcclusionScales : packoffset(c7);
float4 backlightColour : packoffset(c8);
float4 specularScales : packoffset(c9);
float3 specularDirection : packoffset(c10);
float4 specularColourAndMultiplier : packoffset(c11);
float4 fogColour : packoffset(c12);
float4 fogParams : packoffset(c13);
float4 hazeParams : packoffset(c14);
float4 hazeParams2 : packoffset(c15);
float4 nightLightmapParam1 : packoffset(c16);
float4 nightLightmapParam2 : packoffset(c17);
float4 wetLightingParam : packoffset(c18);
float4 snowEffectsParam : packoffset(c19);
float4 ambientColour : packoffset(c20);
float4 shadowBlend : packoffset(c21);
float4 maskParams : packoffset(c22);
float4 deferredSpecularParams : packoffset(c23);
}

cbuffer MatrixPaletteConstantBuffer : register(b4)
{
row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float3 v0 : POSITION0,
float4 v1 : COLOR0,
float3 v2 : NORMAL0,
float4 v3 : TEXCOORD0,
float3 v4 : TANGENT0,
float3 v5 : BINORMAL0,
float v6 : BLENDINDICES0,
out float4 o0 : SV_Position0,
out float4 o1 : COLOR0,
out float4 o2 : COLOR1,
out float4 o3 : TEXCOORD0,
out float4 o4 : TEXCOORD1,
out float4 o5 : TEXCOORD2,
out float4 o6 : TEXCOORD4,
out float4 o7 : TEXCOORD5,
out float4 o8 : TEXCOORD6)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = (uint)v6.x;
r0.x = (uint)r0.x;
r0.x = (int)r0.x;
r0.x = (int)r0.x * 3;
r0.x = (int)r0.x;
r0.x = (uint)r0.x;
r0.x = (int)r0.x * 3;
r1.xyz = v0.xyz;
r1.w = 1;
r2.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02_m03, r1.xyzw);
r2.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12_m13, r1.xyzw);
r2.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22_m23, r1.xyzw);
r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy;
r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw;
r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw;
r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw;
o0.xyzw = r1.xyzw;
o8.xyzw = r1.xyzw;
o1.xy = float2(1,1) + -v1.xy;
r0.y = mudLevel.x + mudLevel.y;
r0.y = mudLevel.z + r0.y;
r0.y = mudLevel.w + r0.y;
r0.y = saturate(0.25 * r0.y);
r0.z = -CleanedMudValue + r0.y;
r0.w = PSSGWorldToLocalMatrix._m11 * r2.y;
r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w;
r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w;
r0.w = PSSGWorldToLocalMatrix._m13 + r0.w;
r1.x = 0.0700000003 + r0.w;
r0.w = cmp(r0.w < WaterCleanHeight);
r1.x = -WaterCleanHeight + r1.x;
r1.x = saturate(14.2857141 * r1.x);
r0.z = r1.x * r0.z + CleanedMudValue;
o1.w = r0.w ? r0.z : r0.y;
r0.y = saturate(dirtLevel);
r0.z = -CleanedDustValue + r0.y;
r0.z = r1.x * r0.z + CleanedDustValue;
o1.z = r0.w ? r0.z : r0.y;
r0.yzw = hazeParams2.xyz + -hazeParams.xyz;
r1.xyz = -eyePositionWS.xyz + r2.xyz;
o3.xyz = r2.xyz;
r1.w = dot(r1.xyz, r1.xyz);
r1.w = sqrt(r1.w);
r1.xyz = r1.xyz / r1.www;
r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz));
r1.x = log2(r1.x);
r1.x = hazeParams2.w * r1.x;
r1.x = exp2(r1.x);
r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz;
r0.y = 1 / fogParams.z;
r0.y = r1.w + -r0.y;
r0.z = -30 + r1.w;
r0.z = saturate(fogParams.z * r0.z);
r1.w = fogParams.w * r0.z;
r0.y = max(0, r0.y);
r0.y = hazeParams.w * r0.y;
r0.y = 1.44269502 * r0.y;
r0.y = exp2(r0.y);
r2.w = 1 + -r0.y;
r1.xyz = fogColour.xyz;
r3.xyzw = r2.xyzw + -r1.xyzw;
r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw;
o2.xyz = r1.xyz * r1.www;
o2.w = 1 + -r1.w;
o3.w = 1;
o4.w = 0;
o4.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v2.xyz);
o4.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v2.xyz);
o4.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v2.xyz);
o5.xyzw = v3.xyzw;
o6.w = 0;
o6.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v4.xyz);
o6.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v4.xyz);
o6.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v4.xyz);
o7.x = dot(PSSGPaletteMatricies[r0.x + 0]._m00_m01_m02, v5.xyz);
o7.y = dot(PSSGPaletteMatricies[r0.x + 1]._m10_m11_m12, v5.xyz);
o7.z = dot(PSSGPaletteMatricies[r0.x + 2]._m20_m21_m22, v5.xyz);
return;
}

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/28/2016 02:27 PM   
@oomek: Below is how I usually fix this bug with the wrong matrix index. The problem is the 3x4 matrix instead of the usual 4x4 matrix. The /3 part is trying to restore the proper index, but misses. The *3 then /3 in the ASM is just normal indexing, so I remove them both. Try this version, as the array indices are correct in ASM. Not sure it's the same as yours, and might still have an alternate bug, but worth a try. [code]// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016 cbuffer _Globals : register(b0) { float4x4 model : packoffset(c0); float4x4 modelViewProj : packoffset(c4); float4x4 prevViewProj : packoffset(c8); float4x4 prevModel : packoffset(c12); float4x4 PSSGWorldToLocalMatrix : packoffset(c16); float4 PartsState : packoffset(c20); float4 PartsState2 : packoffset(c21); float4 PartsState3 : packoffset(c22); float4 PartsState4 : packoffset(c23); float4 Parts : packoffset(c24); float4 Parts2 : packoffset(c25); float4 Parts3 : packoffset(c26); float4 Parts4 : packoffset(c27); float PartStateDefault : packoffset(c28); float3 wobble : packoffset(c28.y); float4 VDParts : packoffset(c29); float4 VDParts2 : packoffset(c30); float4 VDParts3 : packoffset(c31); float4 VDParts4 : packoffset(c32); float4 VDPartsState : packoffset(c33); float4 VDPartsState2 : packoffset(c34); float4 VDPartsState3 : packoffset(c35); float4 VDPartsState4 : packoffset(c36); float4 outbreak_vs_params1 : packoffset(c37); float4 outbreak_vs_params2 : packoffset(c38); float outbreak_vs_params3 : packoffset(c39); float dirtLevel : packoffset(c39.y); float4 mudLevel : packoffset(c40); float WaterCleanHeight : packoffset(c41); float CleanedDustValue : packoffset(c41.y); float CleanedMudValue : packoffset(c41.z); float4 ShadowDepth : packoffset(c42); float4 SlopeBiasVector : packoffset(c43); } cbuffer CameraParamsConstantBuffer : register(b3) { float4x4 projection : packoffset(c0); float4x4 viewProjection : packoffset(c4); row_major float3x4 view : packoffset(c8); row_major float3x4 viewI : packoffset(c11); float3 eyePositionWS : packoffset(c14); float4x4 inverseProj : packoffset(c15); bool leftEye : packoffset(c19); bool padding3[3] : packoffset(c20); } cbuffer PerFrameConstantBuffer : register(b1) { float4 colorBufferEncodingParams : packoffset(c0); float4 envMapEncodingParams : packoffset(c1); float4 velocityEncodingParams : packoffset(c2); float4 snowEffectsParam2 : packoffset(c3); float4 sunDirectionAndTime : packoffset(c4); float4 sunColour : packoffset(c5); float4 skylightColour : packoffset(c6); float4 ambientOcclusionScales : packoffset(c7); float4 backlightColour : packoffset(c8); float4 specularScales : packoffset(c9); float3 specularDirection : packoffset(c10); float4 specularColourAndMultiplier : packoffset(c11); float4 fogColour : packoffset(c12); float4 fogParams : packoffset(c13); float4 hazeParams : packoffset(c14); float4 hazeParams2 : packoffset(c15); float4 nightLightmapParam1 : packoffset(c16); float4 nightLightmapParam2 : packoffset(c17); float4 wetLightingParam : packoffset(c18); float4 snowEffectsParam : packoffset(c19); float4 ambientColour : packoffset(c20); float4 shadowBlend : packoffset(c21); float4 maskParams : packoffset(c22); float4 deferredSpecularParams : packoffset(c23); } cbuffer MatrixPaletteConstantBuffer : register(b4) { row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float3 v0 : POSITION0, float4 v1 : COLOR0, float3 v2 : NORMAL0, float4 v3 : TEXCOORD0, float3 v4 : TANGENT0, float3 v5 : BINORMAL0, float v6 : BLENDINDICES0, out float4 o0 : SV_Position0, out float4 o1 : COLOR0, out float4 o2 : COLOR1, out float4 o3 : TEXCOORD0, out float4 o4 : TEXCOORD1, out float4 o5 : TEXCOORD2, out float4 o6 : TEXCOORD4, out float4 o7 : TEXCOORD5, out float4 o8 : TEXCOORD6) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.x = (uint)v6.x; r0.x = (uint)r0.x; r0.x = (int)r0.x; //r0.x = (int)r0.x * 3; r0.x = (int)r0.x; r0.x = (uint)r0.x; //r0.x = (int)r0.x * 3; r1.xyz = v0.xyz; r1.w = 1; // r2.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12_m13, r1.xyzw); r2.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12_m13, r1.xyzw); r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy; // r2.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02_m03, r1.xyzw); // r2.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22_m23, r1.xyzw); r2.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02_m03, r1.xyzw); r2.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22_m23, r1.xyzw); r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw; r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw; r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw; o0.xyzw = r1.xyzw; o8.xyzw = r1.xyzw; o1.xy = float2(1,1) + -v1.xy; r0.y = mudLevel.x + mudLevel.y; r0.y = mudLevel.z + r0.y; r0.y = mudLevel.w + r0.y; r0.y = saturate(0.25 * r0.y); r0.z = -CleanedMudValue + r0.y; r0.w = PSSGWorldToLocalMatrix._m11 * r2.y; r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w; r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w; r0.w = PSSGWorldToLocalMatrix._m13 + r0.w; r1.x = 0.0700000003 + r0.w; r0.w = cmp(r0.w < WaterCleanHeight); r1.x = -WaterCleanHeight + r1.x; r1.x = saturate(14.2857141 * r1.x); r0.z = r1.x * r0.z + CleanedMudValue; o1.w = r0.w ? r0.z : r0.y; r0.y = saturate(dirtLevel); r0.z = -CleanedDustValue + r0.y; r0.z = r1.x * r0.z + CleanedDustValue; o1.z = r0.w ? r0.z : r0.y; r0.yzw = hazeParams2.xyz + -hazeParams.xyz; r1.xyz = -eyePositionWS.xyz + r2.xyz; o3.xyz = r2.xyz; r1.w = dot(r1.xyz, r1.xyz); r1.w = sqrt(r1.w); r1.xyz = r1.xyz / r1.www; r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz)); r1.x = log2(r1.x); r1.x = hazeParams2.w * r1.x; r1.x = exp2(r1.x); r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz; r0.y = 1 / fogParams.z; r0.y = r1.w + -r0.y; r0.z = -30 + r1.w; r0.z = saturate(fogParams.z * r0.z); r1.w = fogParams.w * r0.z; r0.y = max(0, r0.y); r0.y = hazeParams.w * r0.y; r0.y = 1.44269502 * r0.y; r0.y = exp2(r0.y); r2.w = 1 + -r0.y; r1.xyz = fogColour.xyz; r3.xyzw = r2.xyzw + -r1.xyzw; r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw; o2.xyz = r1.xyz * r1.www; o2.w = 1 + -r1.w; o3.w = 1; o4.w = 0; // o4.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v2.xyz); // o4.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v2.xyz); // o4.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v2.xyz); o4.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v2.xyz); o4.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v2.xyz); o4.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v2.xyz); o5.xyzw = v3.xyzw; o6.w = 0; // o6.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v4.xyz); // o6.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v4.xyz); // o6.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v4.xyz); // o7.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v5.xyz); // o7.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v5.xyz); // o7.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v5.xyz); o6.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v4.xyz); o6.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v4.xyz); o6.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v4.xyz); o7.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v5.xyz); o7.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v5.xyz); o7.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v5.xyz); return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789 // // using 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016 // // // Buffer Definitions: // // cbuffer _Globals // { // // float4x4 model; // Offset: 0 Size: 64 [unused] // float4x4 modelViewProj; // Offset: 64 Size: 64 [unused] // float4x4 prevViewProj; // Offset: 128 Size: 64 [unused] // float4x4 prevModel; // Offset: 192 Size: 64 [unused] // float4x4 PSSGWorldToLocalMatrix; // Offset: 256 Size: 64 // float4 PartsState; // Offset: 320 Size: 16 [unused] // float4 PartsState2; // Offset: 336 Size: 16 [unused] // float4 PartsState3; // Offset: 352 Size: 16 [unused] // float4 PartsState4; // Offset: 368 Size: 16 [unused] // float4 Parts; // Offset: 384 Size: 16 [unused] // float4 Parts2; // Offset: 400 Size: 16 [unused] // float4 Parts3; // Offset: 416 Size: 16 [unused] // float4 Parts4; // Offset: 432 Size: 16 [unused] // float PartStateDefault; // Offset: 448 Size: 4 [unused] // float3 wobble; // Offset: 452 Size: 12 [unused] // float4 VDParts; // Offset: 464 Size: 16 [unused] // float4 VDParts2; // Offset: 480 Size: 16 [unused] // float4 VDParts3; // Offset: 496 Size: 16 [unused] // float4 VDParts4; // Offset: 512 Size: 16 [unused] // float4 VDPartsState; // Offset: 528 Size: 16 [unused] // float4 VDPartsState2; // Offset: 544 Size: 16 [unused] // float4 VDPartsState3; // Offset: 560 Size: 16 [unused] // float4 VDPartsState4; // Offset: 576 Size: 16 [unused] // float4 outbreak_vs_params1; // Offset: 592 Size: 16 [unused] // float4 outbreak_vs_params2; // Offset: 608 Size: 16 [unused] // float outbreak_vs_params3; // Offset: 624 Size: 4 [unused] // float dirtLevel; // Offset: 628 Size: 4 // float4 mudLevel; // Offset: 640 Size: 16 // float WaterCleanHeight; // Offset: 656 Size: 4 // float CleanedDustValue; // Offset: 660 Size: 4 // float CleanedMudValue; // Offset: 664 Size: 4 // float4 ShadowDepth; // Offset: 672 Size: 16 [unused] // float4 SlopeBiasVector; // Offset: 688 Size: 16 [unused] // // } // // cbuffer CameraParamsConstantBuffer // { // // float4x4 projection; // Offset: 0 Size: 64 [unused] // float4x4 viewProjection; // Offset: 64 Size: 64 // row_major float3x4 view; // Offset: 128 Size: 48 [unused] // row_major float3x4 viewI; // Offset: 176 Size: 48 [unused] // float3 eyePositionWS; // Offset: 224 Size: 12 // float4x4 inverseProj; // Offset: 240 Size: 64 [unused] // bool leftEye; // Offset: 304 Size: 4 [unused] // bool padding3[3]; // Offset: 320 Size: 36 [unused] // // } // // cbuffer PerFrameConstantBuffer // { // // float4 colorBufferEncodingParams; // Offset: 0 Size: 16 [unused] // float4 envMapEncodingParams; // Offset: 16 Size: 16 [unused] // float4 velocityEncodingParams; // Offset: 32 Size: 16 [unused] // float4 snowEffectsParam2; // Offset: 48 Size: 16 [unused] // float4 sunDirectionAndTime; // Offset: 64 Size: 16 // float4 sunColour; // Offset: 80 Size: 16 [unused] // float4 skylightColour; // Offset: 96 Size: 16 [unused] // float4 ambientOcclusionScales; // Offset: 112 Size: 16 [unused] // float4 backlightColour; // Offset: 128 Size: 16 [unused] // float4 specularScales; // Offset: 144 Size: 16 [unused] // float3 specularDirection; // Offset: 160 Size: 12 [unused] // float4 specularColourAndMultiplier;// Offset: 176 Size: 16 [unused] // float4 fogColour; // Offset: 192 Size: 16 // float4 fogParams; // Offset: 208 Size: 16 // float4 hazeParams; // Offset: 224 Size: 16 // float4 hazeParams2; // Offset: 240 Size: 16 // float4 nightLightmapParam1; // Offset: 256 Size: 16 [unused] // float4 nightLightmapParam2; // Offset: 272 Size: 16 [unused] // float4 wetLightingParam; // Offset: 288 Size: 16 [unused] // float4 snowEffectsParam; // Offset: 304 Size: 16 [unused] // float4 ambientColour; // Offset: 320 Size: 16 [unused] // float4 shadowBlend; // Offset: 336 Size: 16 [unused] // float4 maskParams; // Offset: 352 Size: 16 [unused] // float4 deferredSpecularParams; // Offset: 368 Size: 16 [unused] // // } // // cbuffer MatrixPaletteConstantBuffer // { // // row_major float3x4 PSSGPaletteMatricies[50];// Offset: 0 Size: 2400 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // _Globals cbuffer NA NA 0 1 // PerFrameConstantBuffer cbuffer NA NA 1 1 // CameraParamsConstantBuffer cbuffer NA NA 3 1 // MatrixPaletteConstantBuffer cbuffer NA NA 4 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyz 0 NONE float xyz // COLOR 0 xyzw 1 NONE float xy // NORMAL 0 xyz 2 NONE float xyz // TEXCOORD 0 xyzw 3 NONE float xyzw // TANGENT 0 xyz 4 NONE float xyz // BINORMAL 0 xyz 5 NONE float xyz // BLENDINDICES 0 x 6 NONE float x // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // COLOR 0 xyzw 1 NONE float xyzw // COLOR 1 xyzw 2 NONE float xyzw // TEXCOORD 0 xyzw 3 NONE float xyzw // TEXCOORD 1 xyzw 4 NONE float xyzw // TEXCOORD 2 xyzw 5 NONE float xyzw // TEXCOORD 4 xyzw 6 NONE float xyzw // TEXCOORD 5 xyzw 7 NONE float xyz // TEXCOORD 6 xyzw 8 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[42], immediateIndexed dcl_constantbuffer cb3[15], immediateIndexed dcl_constantbuffer cb1[16], immediateIndexed dcl_constantbuffer cb4[150], dynamicIndexed dcl_input v0.xyz dcl_input v1.xy dcl_input v2.xyz dcl_input v3.xyzw dcl_input v4.xyz dcl_input v5.xyz dcl_input v6.x dcl_output_siv o0.xyzw, position dcl_output o1.xyzw dcl_output o2.xyzw dcl_output o3.xyzw dcl_output o4.xyzw dcl_output o5.xyzw dcl_output o6.xyzw dcl_output o7.xyz dcl_output o8.xyzw dcl_temps 4 ftou r0.x, v6.x utof r0.x, r0.x ftoi r0.x, r0.x imul null, r0.x, r0.x, l(3) itof r0.x, r0.x ftou r0.x, r0.x imul null, r0.x, r0.x, l(3) mov r1.xyz, v0.xyzx mov r1.w, l(1.000000) dp4 r2.y, cb4[r0.x + 1].xyzw, r1.xyzw mul r3.xyzw, r2.yyyy, cb3[5].xyzw dp4 r2.x, cb4[r0.x + 0].xyzw, r1.xyzw dp4 r2.z, cb4[r0.x + 2].xyzw, r1.xyzw mad r1.xyzw, cb3[4].xyzw, r2.xxxx, r3.xyzw mad r1.xyzw, cb3[6].xyzw, r2.zzzz, r1.xyzw add r1.xyzw, r1.xyzw, cb3[7].xyzw mov o0.xyzw, r1.xyzw mov o8.xyzw, r1.xyzw add o1.xy, -v1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) add r0.y, cb0[40].y, cb0[40].x add r0.y, r0.y, cb0[40].z add r0.y, r0.y, cb0[40].w mul_sat r0.y, r0.y, l(0.250000) add r0.z, r0.y, -cb0[41].z mul r0.w, r2.y, cb0[17].y mad r0.w, cb0[16].y, r2.x, r0.w mad r0.w, cb0[18].y, r2.z, r0.w add r0.w, r0.w, cb0[19].y add r1.x, r0.w, l(0.070000) lt r0.w, r0.w, cb0[41].x add r1.x, r1.x, -cb0[41].x mul_sat r1.x, r1.x, l(14.285714) mad r0.z, r1.x, r0.z, cb0[41].z movc o1.w, r0.w, r0.z, r0.y mov_sat r0.y, cb0[39].y add r0.z, r0.y, -cb0[41].y mad r0.z, r1.x, r0.z, cb0[41].y movc o1.z, r0.w, r0.z, r0.y add r0.yzw, -cb1[14].xxyz, cb1[15].xxyz add r1.xyz, r2.xyzx, -cb3[14].xyzx mov o3.xyz, r2.xyzx dp3 r1.w, r1.xyzx, r1.xyzx sqrt r1.w, r1.w div r1.xyz, r1.xyzx, r1.wwww dp3_sat r1.x, r1.xyzx, cb1[4].xyzx log r1.x, r1.x mul r1.x, r1.x, cb1[15].w exp r1.x, r1.x mad r2.xyz, r1.xxxx, r0.yzwy, cb1[14].xyzx div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[13].z add r0.y, -r0.y, r1.w add r0.z, r1.w, l(-30.000000) mul_sat r0.z, r0.z, cb1[13].z mul r1.w, r0.z, cb1[13].w max r0.y, r0.y, l(0.000000) mul r0.y, r0.y, cb1[14].w mul r0.y, r0.y, l(1.442695) exp r0.y, r0.y add r2.w, -r0.y, l(1.000000) mov r1.xyz, cb1[12].xyzx add r3.xyzw, -r1.xyzw, r2.xyzw mad r1.xyzw, r2.wwww, r3.xyzw, r1.xyzw mul o2.xyz, r1.wwww, r1.xyzx add o2.w, -r1.w, l(1.000000) mov o3.w, l(1.000000) mov o4.w, l(0) dp3 o4.x, cb4[r0.x + 0].xyzx, v2.xyzx dp3 o4.y, cb4[r0.x + 1].xyzx, v2.xyzx dp3 o4.z, cb4[r0.x + 2].xyzx, v2.xyzx mov o5.xyzw, v3.xyzw mov o6.w, l(0) dp3 o6.x, cb4[r0.x + 0].xyzx, v4.xyzx dp3 o6.y, cb4[r0.x + 1].xyzx, v4.xyzx dp3 o6.z, cb4[r0.x + 2].xyzx, v4.xyzx dp3 o7.x, cb4[r0.x + 0].xyzx, v5.xyzx dp3 o7.y, cb4[r0.x + 1].xyzx, v5.xyzx dp3 o7.z, cb4[r0.x + 2].xyzx, v5.xyzx ret // Approximately 78 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code]
@oomek: Below is how I usually fix this bug with the wrong matrix index. The problem is the 3x4 matrix instead of the usual 4x4 matrix. The /3 part is trying to restore the proper index, but misses. The *3 then /3 in the ASM is just normal indexing, so I remove them both.

Try this version, as the array indices are correct in ASM. Not sure it's the same as yours, and might still have an alternate bug, but worth a try.

// ---- Created with 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016

cbuffer _Globals : register(b0)
{
float4x4 model : packoffset(c0);
float4x4 modelViewProj : packoffset(c4);
float4x4 prevViewProj : packoffset(c8);
float4x4 prevModel : packoffset(c12);
float4x4 PSSGWorldToLocalMatrix : packoffset(c16);
float4 PartsState : packoffset(c20);
float4 PartsState2 : packoffset(c21);
float4 PartsState3 : packoffset(c22);
float4 PartsState4 : packoffset(c23);
float4 Parts : packoffset(c24);
float4 Parts2 : packoffset(c25);
float4 Parts3 : packoffset(c26);
float4 Parts4 : packoffset(c27);
float PartStateDefault : packoffset(c28);
float3 wobble : packoffset(c28.y);
float4 VDParts : packoffset(c29);
float4 VDParts2 : packoffset(c30);
float4 VDParts3 : packoffset(c31);
float4 VDParts4 : packoffset(c32);
float4 VDPartsState : packoffset(c33);
float4 VDPartsState2 : packoffset(c34);
float4 VDPartsState3 : packoffset(c35);
float4 VDPartsState4 : packoffset(c36);
float4 outbreak_vs_params1 : packoffset(c37);
float4 outbreak_vs_params2 : packoffset(c38);
float outbreak_vs_params3 : packoffset(c39);
float dirtLevel : packoffset(c39.y);
float4 mudLevel : packoffset(c40);
float WaterCleanHeight : packoffset(c41);
float CleanedDustValue : packoffset(c41.y);
float CleanedMudValue : packoffset(c41.z);
float4 ShadowDepth : packoffset(c42);
float4 SlopeBiasVector : packoffset(c43);
}

cbuffer CameraParamsConstantBuffer : register(b3)
{
float4x4 projection : packoffset(c0);
float4x4 viewProjection : packoffset(c4);
row_major float3x4 view : packoffset(c8);
row_major float3x4 viewI : packoffset(c11);
float3 eyePositionWS : packoffset(c14);
float4x4 inverseProj : packoffset(c15);
bool leftEye : packoffset(c19);
bool padding3[3] : packoffset(c20);
}

cbuffer PerFrameConstantBuffer : register(b1)
{
float4 colorBufferEncodingParams : packoffset(c0);
float4 envMapEncodingParams : packoffset(c1);
float4 velocityEncodingParams : packoffset(c2);
float4 snowEffectsParam2 : packoffset(c3);
float4 sunDirectionAndTime : packoffset(c4);
float4 sunColour : packoffset(c5);
float4 skylightColour : packoffset(c6);
float4 ambientOcclusionScales : packoffset(c7);
float4 backlightColour : packoffset(c8);
float4 specularScales : packoffset(c9);
float3 specularDirection : packoffset(c10);
float4 specularColourAndMultiplier : packoffset(c11);
float4 fogColour : packoffset(c12);
float4 fogParams : packoffset(c13);
float4 hazeParams : packoffset(c14);
float4 hazeParams2 : packoffset(c15);
float4 nightLightmapParam1 : packoffset(c16);
float4 nightLightmapParam2 : packoffset(c17);
float4 wetLightingParam : packoffset(c18);
float4 snowEffectsParam : packoffset(c19);
float4 ambientColour : packoffset(c20);
float4 shadowBlend : packoffset(c21);
float4 maskParams : packoffset(c22);
float4 deferredSpecularParams : packoffset(c23);
}

cbuffer MatrixPaletteConstantBuffer : register(b4)
{
row_major float3x4 PSSGPaletteMatricies[50] : packoffset(c0);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float3 v0 : POSITION0,
float4 v1 : COLOR0,
float3 v2 : NORMAL0,
float4 v3 : TEXCOORD0,
float3 v4 : TANGENT0,
float3 v5 : BINORMAL0,
float v6 : BLENDINDICES0,
out float4 o0 : SV_Position0,
out float4 o1 : COLOR0,
out float4 o2 : COLOR1,
out float4 o3 : TEXCOORD0,
out float4 o4 : TEXCOORD1,
out float4 o5 : TEXCOORD2,
out float4 o6 : TEXCOORD4,
out float4 o7 : TEXCOORD5,
out float4 o8 : TEXCOORD6)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = (uint)v6.x;
r0.x = (uint)r0.x;
r0.x = (int)r0.x;
//r0.x = (int)r0.x * 3;
r0.x = (int)r0.x;
r0.x = (uint)r0.x;
//r0.x = (int)r0.x * 3;
r1.xyz = v0.xyz;
r1.w = 1;
// r2.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12_m13, r1.xyzw);
r2.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12_m13, r1.xyzw);
r3.xyzw = viewProjection._m01_m11_m21_m31 * r2.yyyy;
// r2.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02_m03, r1.xyzw);
// r2.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22_m23, r1.xyzw);
r2.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02_m03, r1.xyzw);
r2.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22_m23, r1.xyzw);
r1.xyzw = viewProjection._m00_m10_m20_m30 * r2.xxxx + r3.xyzw;
r1.xyzw = viewProjection._m02_m12_m22_m32 * r2.zzzz + r1.xyzw;
r1.xyzw = viewProjection._m03_m13_m23_m33 + r1.xyzw;
o0.xyzw = r1.xyzw;
o8.xyzw = r1.xyzw;
o1.xy = float2(1,1) + -v1.xy;
r0.y = mudLevel.x + mudLevel.y;
r0.y = mudLevel.z + r0.y;
r0.y = mudLevel.w + r0.y;
r0.y = saturate(0.25 * r0.y);
r0.z = -CleanedMudValue + r0.y;
r0.w = PSSGWorldToLocalMatrix._m11 * r2.y;
r0.w = PSSGWorldToLocalMatrix._m10 * r2.x + r0.w;
r0.w = PSSGWorldToLocalMatrix._m12 * r2.z + r0.w;
r0.w = PSSGWorldToLocalMatrix._m13 + r0.w;
r1.x = 0.0700000003 + r0.w;
r0.w = cmp(r0.w < WaterCleanHeight);
r1.x = -WaterCleanHeight + r1.x;
r1.x = saturate(14.2857141 * r1.x);
r0.z = r1.x * r0.z + CleanedMudValue;
o1.w = r0.w ? r0.z : r0.y;
r0.y = saturate(dirtLevel);
r0.z = -CleanedDustValue + r0.y;
r0.z = r1.x * r0.z + CleanedDustValue;
o1.z = r0.w ? r0.z : r0.y;
r0.yzw = hazeParams2.xyz + -hazeParams.xyz;
r1.xyz = -eyePositionWS.xyz + r2.xyz;
o3.xyz = r2.xyz;
r1.w = dot(r1.xyz, r1.xyz);
r1.w = sqrt(r1.w);
r1.xyz = r1.xyz / r1.www;
r1.x = saturate(dot(r1.xyz, sunDirectionAndTime.xyz));
r1.x = log2(r1.x);
r1.x = hazeParams2.w * r1.x;
r1.x = exp2(r1.x);
r2.xyz = r1.xxx * r0.yzw + hazeParams.xyz;
r0.y = 1 / fogParams.z;
r0.y = r1.w + -r0.y;
r0.z = -30 + r1.w;
r0.z = saturate(fogParams.z * r0.z);
r1.w = fogParams.w * r0.z;
r0.y = max(0, r0.y);
r0.y = hazeParams.w * r0.y;
r0.y = 1.44269502 * r0.y;
r0.y = exp2(r0.y);
r2.w = 1 + -r0.y;
r1.xyz = fogColour.xyz;
r3.xyzw = r2.xyzw + -r1.xyzw;
r1.xyzw = r2.wwww * r3.xyzw + r1.xyzw;
o2.xyz = r1.xyz * r1.www;
o2.w = 1 + -r1.w;
o3.w = 1;
o4.w = 0;
// o4.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v2.xyz);
// o4.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v2.xyz);
// o4.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v2.xyz);
o4.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v2.xyz);
o4.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v2.xyz);
o4.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v2.xyz);
o5.xyzw = v3.xyzw;
o6.w = 0;
// o6.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v4.xyz);
// o6.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v4.xyz);
// o6.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v4.xyz);
// o7.x = dot(PSSGPaletteMatricies[r0.x/3]._m00_m01_m02, v5.xyz);
// o7.y = dot(PSSGPaletteMatricies[r0.x/3]._m10_m11_m12, v5.xyz);
// o7.z = dot(PSSGPaletteMatricies[r0.x/3]._m20_m21_m22, v5.xyz);
o6.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v4.xyz);
o6.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v4.xyz);
o6.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v4.xyz);
o7.x = dot(PSSGPaletteMatricies[r0.x]._m00_m01_m02, v5.xyz);
o7.y = dot(PSSGPaletteMatricies[r0.x]._m10_m11_m12, v5.xyz);
o7.z = dot(PSSGPaletteMatricies[r0.x]._m20_m21_m22, v5.xyz);
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
// using 3Dmigoto v1.2.31 on Sun Feb 28 14:20:44 2016
//
//
// Buffer Definitions:
//
// cbuffer _Globals
// {
//
// float4x4 model; // Offset: 0 Size: 64 [unused]
// float4x4 modelViewProj; // Offset: 64 Size: 64 [unused]
// float4x4 prevViewProj; // Offset: 128 Size: 64 [unused]
// float4x4 prevModel; // Offset: 192 Size: 64 [unused]
// float4x4 PSSGWorldToLocalMatrix; // Offset: 256 Size: 64
// float4 PartsState; // Offset: 320 Size: 16 [unused]
// float4 PartsState2; // Offset: 336 Size: 16 [unused]
// float4 PartsState3; // Offset: 352 Size: 16 [unused]
// float4 PartsState4; // Offset: 368 Size: 16 [unused]
// float4 Parts; // Offset: 384 Size: 16 [unused]
// float4 Parts2; // Offset: 400 Size: 16 [unused]
// float4 Parts3; // Offset: 416 Size: 16 [unused]
// float4 Parts4; // Offset: 432 Size: 16 [unused]
// float PartStateDefault; // Offset: 448 Size: 4 [unused]
// float3 wobble; // Offset: 452 Size: 12 [unused]
// float4 VDParts; // Offset: 464 Size: 16 [unused]
// float4 VDParts2; // Offset: 480 Size: 16 [unused]
// float4 VDParts3; // Offset: 496 Size: 16 [unused]
// float4 VDParts4; // Offset: 512 Size: 16 [unused]
// float4 VDPartsState; // Offset: 528 Size: 16 [unused]
// float4 VDPartsState2; // Offset: 544 Size: 16 [unused]
// float4 VDPartsState3; // Offset: 560 Size: 16 [unused]
// float4 VDPartsState4; // Offset: 576 Size: 16 [unused]
// float4 outbreak_vs_params1; // Offset: 592 Size: 16 [unused]
// float4 outbreak_vs_params2; // Offset: 608 Size: 16 [unused]
// float outbreak_vs_params3; // Offset: 624 Size: 4 [unused]
// float dirtLevel; // Offset: 628 Size: 4
// float4 mudLevel; // Offset: 640 Size: 16
// float WaterCleanHeight; // Offset: 656 Size: 4
// float CleanedDustValue; // Offset: 660 Size: 4
// float CleanedMudValue; // Offset: 664 Size: 4
// float4 ShadowDepth; // Offset: 672 Size: 16 [unused]
// float4 SlopeBiasVector; // Offset: 688 Size: 16 [unused]
//
// }
//
// cbuffer CameraParamsConstantBuffer
// {
//
// float4x4 projection; // Offset: 0 Size: 64 [unused]
// float4x4 viewProjection; // Offset: 64 Size: 64
// row_major float3x4 view; // Offset: 128 Size: 48 [unused]
// row_major float3x4 viewI; // Offset: 176 Size: 48 [unused]
// float3 eyePositionWS; // Offset: 224 Size: 12
// float4x4 inverseProj; // Offset: 240 Size: 64 [unused]
// bool leftEye; // Offset: 304 Size: 4 [unused]
// bool padding3[3]; // Offset: 320 Size: 36 [unused]
//
// }
//
// cbuffer PerFrameConstantBuffer
// {
//
// float4 colorBufferEncodingParams; // Offset: 0 Size: 16 [unused]
// float4 envMapEncodingParams; // Offset: 16 Size: 16 [unused]
// float4 velocityEncodingParams; // Offset: 32 Size: 16 [unused]
// float4 snowEffectsParam2; // Offset: 48 Size: 16 [unused]
// float4 sunDirectionAndTime; // Offset: 64 Size: 16
// float4 sunColour; // Offset: 80 Size: 16 [unused]
// float4 skylightColour; // Offset: 96 Size: 16 [unused]
// float4 ambientOcclusionScales; // Offset: 112 Size: 16 [unused]
// float4 backlightColour; // Offset: 128 Size: 16 [unused]
// float4 specularScales; // Offset: 144 Size: 16 [unused]
// float3 specularDirection; // Offset: 160 Size: 12 [unused]
// float4 specularColourAndMultiplier;// Offset: 176 Size: 16 [unused]
// float4 fogColour; // Offset: 192 Size: 16
// float4 fogParams; // Offset: 208 Size: 16
// float4 hazeParams; // Offset: 224 Size: 16
// float4 hazeParams2; // Offset: 240 Size: 16
// float4 nightLightmapParam1; // Offset: 256 Size: 16 [unused]
// float4 nightLightmapParam2; // Offset: 272 Size: 16 [unused]
// float4 wetLightingParam; // Offset: 288 Size: 16 [unused]
// float4 snowEffectsParam; // Offset: 304 Size: 16 [unused]
// float4 ambientColour; // Offset: 320 Size: 16 [unused]
// float4 shadowBlend; // Offset: 336 Size: 16 [unused]
// float4 maskParams; // Offset: 352 Size: 16 [unused]
// float4 deferredSpecularParams; // Offset: 368 Size: 16 [unused]
//
// }
//
// cbuffer MatrixPaletteConstantBuffer
// {
//
// row_major float3x4 PSSGPaletteMatricies[50];// Offset: 0 Size: 2400
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _Globals cbuffer NA NA 0 1
// PerFrameConstantBuffer cbuffer NA NA 1 1
// CameraParamsConstantBuffer cbuffer NA NA 3 1
// MatrixPaletteConstantBuffer cbuffer NA NA 4 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// COLOR 0 xyzw 1 NONE float xy
// NORMAL 0 xyz 2 NONE float xyz
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TANGENT 0 xyz 4 NONE float xyz
// BINORMAL 0 xyz 5 NONE float xyz
// BLENDINDICES 0 x 6 NONE float x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// COLOR 0 xyzw 1 NONE float xyzw
// COLOR 1 xyzw 2 NONE float xyzw
// TEXCOORD 0 xyzw 3 NONE float xyzw
// TEXCOORD 1 xyzw 4 NONE float xyzw
// TEXCOORD 2 xyzw 5 NONE float xyzw
// TEXCOORD 4 xyzw 6 NONE float xyzw
// TEXCOORD 5 xyzw 7 NONE float xyz
// TEXCOORD 6 xyzw 8 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[42], immediateIndexed
dcl_constantbuffer cb3[15], immediateIndexed
dcl_constantbuffer cb1[16], immediateIndexed
dcl_constantbuffer cb4[150], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input v4.xyz
dcl_input v5.xyz
dcl_input v6.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyz
dcl_output o8.xyzw
dcl_temps 4
ftou r0.x, v6.x
utof r0.x, r0.x
ftoi r0.x, r0.x
imul null, r0.x, r0.x, l(3)
itof r0.x, r0.x
ftou r0.x, r0.x
imul null, r0.x, r0.x, l(3)
mov r1.xyz, v0.xyzx
mov r1.w, l(1.000000)
dp4 r2.y, cb4[r0.x + 1].xyzw, r1.xyzw
mul r3.xyzw, r2.yyyy, cb3[5].xyzw
dp4 r2.x, cb4[r0.x + 0].xyzw, r1.xyzw
dp4 r2.z, cb4[r0.x + 2].xyzw, r1.xyzw
mad r1.xyzw, cb3[4].xyzw, r2.xxxx, r3.xyzw
mad r1.xyzw, cb3[6].xyzw, r2.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb3[7].xyzw
mov o0.xyzw, r1.xyzw
mov o8.xyzw, r1.xyzw
add o1.xy, -v1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
add r0.y, cb0[40].y, cb0[40].x
add r0.y, r0.y, cb0[40].z
add r0.y, r0.y, cb0[40].w
mul_sat r0.y, r0.y, l(0.250000)
add r0.z, r0.y, -cb0[41].z
mul r0.w, r2.y, cb0[17].y
mad r0.w, cb0[16].y, r2.x, r0.w
mad r0.w, cb0[18].y, r2.z, r0.w
add r0.w, r0.w, cb0[19].y
add r1.x, r0.w, l(0.070000)
lt r0.w, r0.w, cb0[41].x
add r1.x, r1.x, -cb0[41].x
mul_sat r1.x, r1.x, l(14.285714)
mad r0.z, r1.x, r0.z, cb0[41].z
movc o1.w, r0.w, r0.z, r0.y
mov_sat r0.y, cb0[39].y
add r0.z, r0.y, -cb0[41].y
mad r0.z, r1.x, r0.z, cb0[41].y
movc o1.z, r0.w, r0.z, r0.y
add r0.yzw, -cb1[14].xxyz, cb1[15].xxyz
add r1.xyz, r2.xyzx, -cb3[14].xyzx
mov o3.xyz, r2.xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
sqrt r1.w, r1.w
div r1.xyz, r1.xyzx, r1.wwww
dp3_sat r1.x, r1.xyzx, cb1[4].xyzx
log r1.x, r1.x
mul r1.x, r1.x, cb1[15].w
exp r1.x, r1.x
mad r2.xyz, r1.xxxx, r0.yzwy, cb1[14].xyzx
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[13].z
add r0.y, -r0.y, r1.w
add r0.z, r1.w, l(-30.000000)
mul_sat r0.z, r0.z, cb1[13].z
mul r1.w, r0.z, cb1[13].w
max r0.y, r0.y, l(0.000000)
mul r0.y, r0.y, cb1[14].w
mul r0.y, r0.y, l(1.442695)
exp r0.y, r0.y
add r2.w, -r0.y, l(1.000000)
mov r1.xyz, cb1[12].xyzx
add r3.xyzw, -r1.xyzw, r2.xyzw
mad r1.xyzw, r2.wwww, r3.xyzw, r1.xyzw
mul o2.xyz, r1.wwww, r1.xyzx
add o2.w, -r1.w, l(1.000000)
mov o3.w, l(1.000000)
mov o4.w, l(0)
dp3 o4.x, cb4[r0.x + 0].xyzx, v2.xyzx
dp3 o4.y, cb4[r0.x + 1].xyzx, v2.xyzx
dp3 o4.z, cb4[r0.x + 2].xyzx, v2.xyzx
mov o5.xyzw, v3.xyzw
mov o6.w, l(0)
dp3 o6.x, cb4[r0.x + 0].xyzx, v4.xyzx
dp3 o6.y, cb4[r0.x + 1].xyzx, v4.xyzx
dp3 o6.z, cb4[r0.x + 2].xyzx, v4.xyzx
dp3 o7.x, cb4[r0.x + 0].xyzx, v5.xyzx
dp3 o7.y, cb4[r0.x + 1].xyzx, v5.xyzx
dp3 o7.z, cb4[r0.x + 2].xyzx, v5.xyzx
ret
// Approximately 78 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

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

Posted 02/28/2016 03:36 PM   
That did the trick, Thanks Bo3b.
That did the trick, Thanks Bo3b.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/28/2016 03:38 PM   
[quote="helifax"]Hi DarkStarSword, Really awesome update there! I'm a bit out of the loop with SBS support added in the latest 3DMigoto. I am still working on Rise Of Tomb Raider fix. The fix started with 3DMigoto v.1.2.27. Is there a reason to update to this version? It is posible some things are not compatible? Or should the upgrade just be a process of copy/paste the new DLL?:) I figured you are the best person to ask this:)[/quote]If you don't need the new features it's not critical to update. It might be worthwhile doing so anyway so people can use the SBS / TAB support with minimal effort on their part. There are also a couple of bug fixes since 1.2.27 that might be worth updating for, but nothing too major - I fixed a rare crash that may occur while either hunting, track_texture_updates, or expand_region_copy is enabled in multi-threaded games, plus a few other bugs found by static code analysis. Updating 3DMigoto just needs the new DLLs copied in, though to add SBS & TAB support you will also need the [CustomShader3DVision2SBS] section from the ini, the line in the [Present] section to call it (if you are already using a [Present] section just add that line, otherwise add the whole section), the [KeyChange3DVision2SBSOutputMode] section and the custom vertex & pixel shaders in the ShaderFixes directory. Generaly speaking we always aim to keep 3DMigoto compatible with existing fixes unless we have a good reason to break them - and if we do, we would bump the second number in the version string to signify that (i.e. 1.0 -> 1.1 was a major rewrite of some core code and re-introduced DXGI support, which broke a lot of games until it stabilised, 1.1 -> 1.2 changed the texture hashes for performance, 1.2 -> 1.3 will also likely be due to changing the texture hashes (for performance in games that need track_texture_updates for texture filtering to work reliably - FC4 in particular would benefit, and I've been holding off adding texture filtering to MGSV until this is ready since I noticed it had the same problem). I did remove preloading shaders a couple of versions ago, but only because I'm pretty sure no one was using it and I'm pretty sure it had been broken for some time. Of course there is always the risk that I might inadvertently introduce a bug, but if I do it will most likely be in the features that are under active development, like the resource copying or shader injection code, and just as likely to be fixed a couple of versions later when I notice ;-)
helifax said:Hi DarkStarSword,

Really awesome update there! I'm a bit out of the loop with SBS support added in the latest 3DMigoto.
I am still working on Rise Of Tomb Raider fix. The fix started with 3DMigoto v.1.2.27.

Is there a reason to update to this version? It is posible some things are not compatible? Or should the upgrade just be a process of copy/paste the new DLL?:) I figured you are the best person to ask this:)
If you don't need the new features it's not critical to update. It might be worthwhile doing so anyway so people can use the SBS / TAB support with minimal effort on their part. There are also a couple of bug fixes since 1.2.27 that might be worth updating for, but nothing too major - I fixed a rare crash that may occur while either hunting, track_texture_updates, or expand_region_copy is enabled in multi-threaded games, plus a few other bugs found by static code analysis.

Updating 3DMigoto just needs the new DLLs copied in, though to add SBS & TAB support you will also need the [CustomShader3DVision2SBS] section from the ini, the line in the [Present] section to call it (if you are already using a [Present] section just add that line, otherwise add the whole section), the [KeyChange3DVision2SBSOutputMode] section and the custom vertex & pixel shaders in the ShaderFixes directory.

Generaly speaking we always aim to keep 3DMigoto compatible with existing fixes unless we have a good reason to break them - and if we do, we would bump the second number in the version string to signify that (i.e. 1.0 -> 1.1 was a major rewrite of some core code and re-introduced DXGI support, which broke a lot of games until it stabilised, 1.1 -> 1.2 changed the texture hashes for performance, 1.2 -> 1.3 will also likely be due to changing the texture hashes (for performance in games that need track_texture_updates for texture filtering to work reliably - FC4 in particular would benefit, and I've been holding off adding texture filtering to MGSV until this is ready since I noticed it had the same problem).

I did remove preloading shaders a couple of versions ago, but only because I'm pretty sure no one was using it and I'm pretty sure it had been broken for some time.

Of course there is always the risk that I might inadvertently introduce a bug, but if I do it will most likely be in the features that are under active development, like the resource copying or shader injection code, and just as likely to be fixed a couple of versions later when I notice ;-)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 02/28/2016 04:07 PM   
That compiling time is still bothering me. Do you know why it takes 2 seconds to compile the above shader?
That compiling time is still bothering me. Do you know why it takes 2 seconds to compile the above shader?

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/28/2016 04:30 PM   
@DarkStarSword thank you for the TAB support. I mentioned it a while ago on the forum, but did not get any answer, so the feature you introduced was a big surprise.
@DarkStarSword thank you for the TAB support. I mentioned it a while ago on the forum, but did not get any answer, so the feature you introduced was a big surprise.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/28/2016 04:32 PM   
DarkStarSword, with my dx9 wrapper code public on GitHub you could look at it to see if it is feasable. My wrapper only supports a sub-set of all game fixes.
DarkStarSword, with my dx9 wrapper code public on GitHub you could look at it to see if it is feasable.

My wrapper only supports a sub-set of all game fixes.

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

Posted 02/28/2016 04:54 PM   
Big Thanks DarkStarSword for the complete reply. I guess no harm will come upgrading to the latest version;) If something doesn't work at least we will catch a bug;) I'll try to make the release with 1.2.32 version then;)
Big Thanks DarkStarSword for the complete reply.
I guess no harm will come upgrading to the latest version;)
If something doesn't work at least we will catch a bug;)

I'll try to make the release with 1.2.32 version then;)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 02/28/2016 07:16 PM   
Bug? 3DM probably skips the shaders with warnings. I was unable to dump it with cycling through vertex shaders. I had to export all shaders and find that vertex shader based on the hash found in the Shaderusage.txt [code]/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HLSL errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\GAMES\STEAM\steamapps\common\DiRT 3 Complete Edition\wrapper1349(107,14-15): warning X3578: Output value 'o1' is not completely initialized C:\GAMES\STEAM\steamapps\common\DiRT 3 Complete Edition\wrapper1349(109,14-15): warning X3578: Output value 'o3' is not completely initialized ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code]
Bug?

3DM probably skips the shaders with warnings. I was unable to dump it with cycling through vertex shaders. I had to export all shaders and find that vertex shader based on the hash found in the Shaderusage.txt

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HLSL errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\GAMES\STEAM\steamapps\common\DiRT 3 Complete Edition\wrapper1349(107,14-15): warning X3578: Output value 'o1' is not completely initialized
C:\GAMES\STEAM\steamapps\common\DiRT 3 Complete Edition\wrapper1349(109,14-15): warning X3578: Output value 'o3' is not completely initialized
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 02/29/2016 07:40 PM   
  58 / 141    
Scroll To Top