Zombi from Ubisoft
  2 / 2    
[img]https://forums.geforce.com/cmd/default/download-comment-attachment/65793/[/img] [img]https://forums.geforce.com/cmd/default/download-comment-attachment/65796/[/img] [img]https://forums.geforce.com/cmd/default/download-comment-attachment/65794/[/img] [img]https://forums.geforce.com/cmd/default/download-comment-attachment/65795/[/img] OK, let's start with the torch as it is most important. This actually doesn't look too promising upon first inspection, because this is a game engine that I don't think we have any example fixes for, called the LyN engine. (Raving Rabbids, Beyond Good and Evil). That means it's extra hard because we don't have any examples of prior fixes to crib from. Secondly, that VS has a couple of bad looking pieces, where the variable name is "VS_Quad2DScaleAndOffset", which suggests a strictly 2D effect. And the "mov o0.zw, c238.xyxy" instruction is also not doing anything remotely normal for a vertex there- looks like a constant of some form pushed into the zw output. So, we are not off to a good start, but let's see if there is anything we can figure out. Please add the PixelShader for that specific effect as well. Sometimes the combination of the two (VS->PS) can help clarify how it's used. Experiment with zeroing out different pieces of the output. Zero out the o1 and o2 successively, and see what the effect is. Try applying the Prime Directive on the o0 position parameter (it should automatically get that from the driver, but it's worth experimenting.) Try using the Negative of the Prime Directive instead, to remove the correction the driver might be adding. Any of those experiments might give you some insight into how the effect is drawn, and what might need a tweak.
Image

Image

Image

Image


OK, let's start with the torch as it is most important.

This actually doesn't look too promising upon first inspection, because this is a game engine that I don't think we have any example fixes for, called the LyN engine. (Raving Rabbids, Beyond Good and Evil).

That means it's extra hard because we don't have any examples of prior fixes to crib from.

Secondly, that VS has a couple of bad looking pieces, where the variable name is "VS_Quad2DScaleAndOffset", which suggests a strictly 2D effect. And the "mov o0.zw, c238.xyxy" instruction is also not doing anything remotely normal for a vertex there- looks like a constant of some form pushed into the zw output.


So, we are not off to a good start, but let's see if there is anything we can figure out.

Please add the PixelShader for that specific effect as well. Sometimes the combination of the two (VS->PS) can help clarify how it's used.

Experiment with zeroing out different pieces of the output. Zero out the o1 and o2 successively, and see what the effect is. Try applying the Prime Directive on the o0 position parameter (it should automatically get that from the driver, but it's worth experimenting.) Try using the Negative of the Prime Directive instead, to remove the correction the driver might be adding.

Any of those experiments might give you some insight into how the effect is drawn, and what might need a tweak.

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

#16
Posted 08/27/2015 07:05 AM   
If I'd doing it right there seem to be four pixel shaders paired with the vertex shader, dependin on where you happen to be looking. Here they are: PixelShader_62_CRC32_039189D2 [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // struct // { // float4 f4_LightPos; // float4 f4_Color; // float4 f4_LightInfo; // float4 f4_SpotDir; // float4 f4_NormalAtt; // // } PS_Conic; // // struct // { // float4 f44_ViewInvLightInvProj[4]; // float4 f4_ShadowFetchConst; // // } PS_Normal; // // sampler2D samp_Albedo; // sampler2D samp_Normal; // sampler2D samp_ShadowZ; // // // Registers: // // Name Reg Size // ------------ ----- ---- // PS_Conic c0 4 // PS_Normal c152 5 // samp_ShadowZ s12 1 // samp_Albedo s14 1 // samp_Normal s15 1 // ps_3_0 def c4, 1, 0.5, 0, 0.25 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xy dcl_2d s12 dcl_2d s14 dcl_2d s15 mul r0, c4.y, v2.xyxy frc r0, r0 mad r0, r0, c156.x, c156.yyzz texld r1, v0, s15 mul r2.x, r1.w, v1.z mul r2.xyz, r2.x, v1 mov r2.w, c4.x dp4 r3.x, r2, c155 rcp r3.x, r3.x dp4 r4.x, r2, c152 dp4 r4.y, r2, c153 dp4 r2.x, r2, c154 mul r2.z, r3.x, r2.x mad r5, r4.xyxy, r3.x, r0.zwzy mad r0, r4.xyxy, r3.x, r0.xwxy mul r3.xyw, r5.zwzx, c4.xxzz mul r2.xyw, r5.xyzx, c4.xxzz texldl r4, r2, s12 mov r3.z, r2.z mov r2.zw, r3 texldl r3, r3, s12 mov r4.y, r3.x mov r3.zw, r2 mov r3.xy, r0.zwzw mov r2.xy, r0 texldl r0, r2, s12 mov r4.z, r0.x texldl r0, r3, s12 mov r4.w, r0.x dp4 r0.x, r4, c4.w add r0.x, r0.x, -c4.x mov r2.x, c4.x mad r0.x, c1.w, r0.x, r2.x mad r0.yzw, v1.xxyz, -r1.w, c0.xxyz dp3 r1.w, r0.yzww, r0.yzww rsq r1.w, r1.w mul r0.yzw, r0, r1.w rcp r1.w, r1.w mad_sat r1.w, r1.w, c2.x, c2.y dp3 r2.x, r0.yzww, -c3 dp3_sat_pp r0.y, r1, r0.yzww mad_sat r0.z, r2.x, c2.z, c2.w mul r0.z, r0.z, r1.w mul r1.xyz, r0.z, c1 mul_pp r0.xzw, r0.x, r1.xyyz mul_pp r0.xyz, r0.xzww, r0.y texld r1, v0, s14 add r1.xyz, r1, r1 mul_pp r0.xyz, r0, r1 mul_pp oC0.xyz, r0, c4.w mov_pp oC0.w, c4.z // approximately 55 instruction slots used (10 texture, 45 arithmetic) [/code] PixelShader_79_CRC32_A31BCA63 [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // struct // { // float4 f4_LightPos; // float4 f4_Color; // float4 f4_LightInfo; // float4 f4_SpotDir; // float4 f4_NormalAtt; // // } PS_Conic; // // struct // { // float4 f44_ViewInvLightInvProj[4]; // float4 f4_ShadowFetchConst; // // } PS_Normal; // // float4 ps_lightParamUnscale; // sampler2D samp_Albedo; // sampler2D samp_LightParam; // sampler2D samp_Normal; // sampler2D samp_ShadowZ; // // // Registers: // // Name Reg Size // -------------------- ----- ---- // PS_Conic c0 4 // PS_Normal c152 5 // ps_lightParamUnscale c218 1 // samp_ShadowZ s12 1 // samp_LightParam s13 1 // samp_Albedo s14 1 // samp_Normal s15 1 // ps_3_0 def c4, -9.99999975e-005, -13.2877121, 1, 0.5 def c5, 1, 0, 0.25, 0 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xy dcl_2d s12 dcl_2d s13 dcl_2d s14 dcl_2d s15 mul r0, c4.w, v2.xyxy frc r0, r0 mad r0, r0, c156.x, c156.yyzz mov r1.w, c4.z texld r2, v0, s15 mul r3.xyz, r2.w, v1 mul r1.xyz, r3.z, v1 nrm_pp r4.xyz, r3 dp4 r3.x, r1, c155 rcp r3.x, r3.x dp4 r5.x, r1, c152 dp4 r5.y, r1, c153 dp4 r1.x, r1, c154 mul r1.z, r3.x, r1.x mad r6, r5.xyxy, r3.x, r0.zwzy mad r0, r5.xyxy, r3.x, r0.xwxy mul r3.xyw, r6.zwzx, c5.xxzy mul r1.xyw, r6.xyzx, c5.xxzy texldl r5, r1, s12 mov r3.z, r1.z mov r1.zw, r3 texldl r3, r3, s12 mov r5.y, r3.x mov r3.zw, r1 mov r3.xy, r0.zwzw mov r1.xy, r0 texldl r0, r1, s12 mov r5.z, r0.x texldl r0, r3, s12 mov r5.w, r0.x dp4 r0.x, r5, c5.z add r0.x, r0.x, -c4.z mov r0.z, c4.z mad r0.x, c1.w, r0.x, r0.z mad r0.yzw, v1.xxyz, -r2.w, c0.xxyz dp3 r1.x, r0.yzww, r0.yzww rsq r1.x, r1.x rcp r1.y, r1.x mul r0.yzw, r0, r1.x mad_sat r1.x, r1.y, c2.x, c2.y dp3 r1.y, r0.yzww, -c3 mad_sat r1.y, r1.y, c2.z, c2.w mul r1.x, r1.y, r1.x mul r1.xyz, r1.x, c1 mul_pp r1.xyz, r0.x, r1 dp3 r0.x, r4, r2 add r0.x, r0.x, r0.x mad r3.xyz, r2, -r0.x, r4 dp3_sat_pp r0.x, r2, r0.yzww dp3_sat r0.y, r0.yzww, r3 mul_pp r0.xzw, r1.xyyz, r0.x add r1.w, r0.y, c4.x log r0.y, r0.y cmp r0.y, r1.w, r0.y, c4.y texld r2, v0, s13 mul r1.w, r2.y, c218.y mul r0.y, r0.y, r1.w exp_pp r0.y, r0.y mul_pp r1.xyz, r1, r0.y mul r1.xyz, r2.x, r1 texld r2, v0, s14 add r2.xyz, r2, r2 mad_pp r0.xyz, r0.xzww, r2, r1 mul_pp oC0.xyz, r0, c5.z mov_pp oC0.w, c5.y // approximately 71 instruction slots used (11 texture, 60 arithmetic) [/code] PixelShader_103_CRC32_C1F8423D [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // struct // { // float4 f4_LightPos; // float4 f4_Color; // float4 f4_LightInfo; // float4 f4_SpotDir; // float4 f4_NormalAtt; // // } PS_Conic; // // struct // { // float4 f44_ViewInvLightInvProj[4]; // float4 f4_ShadowFetchConst; // // } PS_Normal; // // float4 ps_lightParamUnscale; // sampler2D samp_Albedo; // sampler2D samp_LightParam; // sampler2D samp_Normal; // sampler2D samp_ShadowMask; // sampler2D samp_ShadowZ; // // // Registers: // // Name Reg Size // -------------------- ----- ---- // PS_Conic c0 5 // PS_Normal c152 5 // ps_lightParamUnscale c218 1 // samp_ShadowMask s9 1 // samp_ShadowZ s12 1 // samp_LightParam s13 1 // samp_Albedo s14 1 // samp_Normal s15 1 // ps_3_0 def c5, 0.5, 1, 0, 0.25 def c6, -1, 1, -9.99999975e-005, -13.2877121 def c7, 4, -1, 0, 0 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xy dcl_2d s9 dcl_2d s12 dcl_2d s13 dcl_2d s14 dcl_2d s15 mul r0, c5.x, v2.xyxy frc r0, r0 mad r0, r0, c156.x, c156.yyzz mov r1.w, c6.y texld r2, v0, s15 mul r3.xyz, r2.w, v1 mul r1.xyz, r3.z, v1 nrm_pp r4.xyz, r3 dp4 r3.x, r1, c155 mul r5, r0, r3.x mad r0, r5, c0.w, r0 rcp r3.x, r3.x dp4 r5.x, r1, c152 dp4 r5.y, r1, c153 dp4 r5.z, r1, c154 mul r1.xyz, r3.x, r5 mad r6, r5.xyxy, r3.x, r0.zwzy mad r0, r5.xyxy, r3.x, r0.xwxy mul r3.xyw, r6.zwzx, c5.yyzz mul r5.xyw, r6.xyzx, c5.yyzz mov r5.z, r1.z texld r1, r1, s9 mov r3.z, r5.z texldl r5, r5, s12 mov r6.zw, r3 texldl r3, r3, s12 mov r5.y, r3.x mov r3.zw, r6 mov r3.xy, r0.zwzw mov r6.xy, r0 texldl r0, r6, s12 mov r5.z, r0.x texldl r0, r3, s12 mov r5.w, r0.x dp4 r0.x, r5, c5.w mul r0.x, r0.x, c5.x mul r0.x, r0.x, r1.x mad r0.x, r0.x, c7.x, c7.y mad r0.yzw, v1.xxyz, -r2.w, c0.xxyz dp3 r1.x, r0.yzww, r0.yzww rsq r1.x, r1.x rcp r1.y, r1.x mul r0.yzw, r0, r1.x mad_sat r1.x, r1.y, c2.x, c2.y pow r2.w, r1.x, c3.w mul r1.y, r2.w, c1.w mad r0.x, r1.y, r0.x, c6.y dp3 r1.y, r0.yzww, -c3 mad_sat r1.y, r1.y, c2.z, c2.w mul r1.x, r1.y, r1.x mul r1.xyz, r1.x, c1 mul_pp r1.xyz, r0.x, r1 dp3 r0.x, r4, r2 add r0.x, r0.x, r0.x mad r3.xyz, r2, -r0.x, r4 dp3_sat r0.x, r2, r0.yzww dp3_sat r0.y, r0.yzww, r3 add r0.x, r0.x, c6.x mov r2.y, c6.y mad_pp r0.x, c4.x, r0.x, r2.y mul_pp r0.xzw, r1.xyyz, r0.x add r1.w, r0.y, c6.z log r0.y, r0.y cmp r0.y, r1.w, r0.y, c6.w texld r2, v0, s13 mul r1.w, r2.y, c218.y mul r0.y, r0.y, r1.w exp_pp r0.y, r0.y mul_pp r1.xyz, r1, r0.y mul r1.xyz, r2.x, r1 texld r2, v0, s14 add r2.xyz, r2, r2 mad_pp r0.xyz, r0.xzww, r2, r1 mul_pp oC0.xyz, r0, c5.w mov_pp oC0.w, c5.z // approximately 83 instruction slots used (12 texture, 71 arithmetic) [/code] PixelShader_349_CRC32_FBB6F3E5 [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // struct // { // float4 f4_LightPos; // float4 f4_Color; // float4 f4_LightInfo; // float4 f4_SpotDir; // float4 f4_NormalAtt; // // } PS_Conic; // // struct // { // float4 f44_ViewInvLightInvProj[4]; // float4 f4_ShadowFetchConst; // // } PS_Normal; // // float4 ps_lightParamUnscale; // sampler2D samp_Albedo; // sampler2D samp_LightParam; // sampler2D samp_Normal; // sampler2D samp_ShadowMask; // sampler2D samp_ShadowZ; // // // Registers: // // Name Reg Size // -------------------- ----- ---- // PS_Conic c0 4 // PS_Normal c152 5 // ps_lightParamUnscale c218 1 // samp_ShadowMask s9 1 // samp_ShadowZ s12 1 // samp_LightParam s13 1 // samp_Albedo s14 1 // samp_Normal s15 1 // ps_3_0 def c4, -9.99999975e-005, -13.2877121, 1, 0.5 def c5, 1, 0, 0.25, -4 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xy dcl_2d s9 dcl_2d s12 dcl_2d s13 dcl_2d s14 dcl_2d s15 mov r0.w, c4.z texld r1, v0, s15 mul r2.xyz, r1.w, v1 mul r0.xyz, r2.z, v1 nrm_pp r3.xyz, r2 dp4 r2.z, r0, c154 dp4 r2.w, r0, c155 rcp r2.w, r2.w dp4 r2.x, r0, c152 dp4 r2.y, r0, c153 mul r0.xyz, r2.w, r2 texld r4, r0, s9 mov r5.z, r0.z mul r6, c4.w, v2.xyxy frc r6, r6 mad r6, r6, c156.x, c156.yyzz mad r7, r2.xyxy, r2.w, r6.zwzy mad r2, r2.xyxy, r2.w, r6.xwxy mul r5.xyw, r7.zwzx, c5.xxzy mul r0.xyw, r7.xyzx, c5.xxzy texldl r0, r0, s12 mov r6.zw, r5 texldl r5, r5, s12 mov r0.y, r5.x mov r5.zw, r6 mov r5.xy, r2.zwzw mov r6.xy, r2 texldl r2, r6, s12 mov r0.z, r2.x texldl r2, r5, s12 mov r0.w, r2.x dp4 r0.x, r0, c5.z mul r0.x, r0.x, c4.w mul r0.x, r0.x, r4.x mad r0.x, r0.x, -c5.w, -c5.x mov r0.z, c4.z mad r0.x, c1.w, r0.x, r0.z mad r0.yzw, v1.xxyz, -r1.w, c0.xxyz dp3 r1.w, r0.yzww, r0.yzww rsq r1.w, r1.w rcp r2.x, r1.w mul r0.yzw, r0, r1.w mad_sat r1.w, r2.x, c2.x, c2.y dp3 r2.x, r0.yzww, -c3 mad_sat r2.x, r2.x, c2.z, c2.w mul r1.w, r1.w, r2.x mul r2.xyz, r1.w, c1 mul_pp r2.xyz, r0.x, r2 dp3 r0.x, r3, r1 add r0.x, r0.x, r0.x mad r3.xyz, r1, -r0.x, r3 dp3_sat_pp r0.x, r1, r0.yzww dp3_sat r0.y, r0.yzww, r3 mul_pp r0.xzw, r2.xyyz, r0.x add r1.x, r0.y, c4.x log r0.y, r0.y cmp r0.y, r1.x, r0.y, c4.y texld r1, v0, s13 mul r1.y, r1.y, c218.y mul r0.y, r0.y, r1.y exp_pp r0.y, r0.y mul_pp r1.yzw, r2.xxyz, r0.y mul r1.xyz, r1.x, r1.yzww texld r2, v0, s14 add r2.xyz, r2, r2 mad_pp r0.xyz, r0.xzww, r2, r1 mul_pp oC0.xyz, r0, c5.z mov_pp oC0.w, c5.y // approximately 74 instruction slots used (12 texture, 62 arithmetic) [/code] I zeroed out (deleted the lines - is that right?) the o1 and that switched off the effect, But when I zeroed out the o2 I could clearly see the 2d effect of the torch, see screen shot. I'm going to look at the prime directive, but somehow I managed to completely miss your wiki! So i'm going to go through all the tutorials and get my head in the 3d shader game!
If I'd doing it right there seem to be four pixel shaders paired with the vertex shader, dependin on where you happen to be looking.

Here they are:

PixelShader_62_CRC32_039189D2

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// struct
// {
// float4 f4_LightPos;
// float4 f4_Color;
// float4 f4_LightInfo;
// float4 f4_SpotDir;
// float4 f4_NormalAtt;
//
// } PS_Conic;
//
// struct
// {
// float4 f44_ViewInvLightInvProj[4];
// float4 f4_ShadowFetchConst;
//
// } PS_Normal;
//
// sampler2D samp_Albedo;
// sampler2D samp_Normal;
// sampler2D samp_ShadowZ;
//
//
// Registers:
//
// Name Reg Size
// ------------ ----- ----
// PS_Conic c0 4
// PS_Normal c152 5
// samp_ShadowZ s12 1
// samp_Albedo s14 1
// samp_Normal s15 1
//

ps_3_0
def c4, 1, 0.5, 0, 0.25
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xy
dcl_2d s12
dcl_2d s14
dcl_2d s15
mul r0, c4.y, v2.xyxy
frc r0, r0
mad r0, r0, c156.x, c156.yyzz
texld r1, v0, s15
mul r2.x, r1.w, v1.z
mul r2.xyz, r2.x, v1
mov r2.w, c4.x
dp4 r3.x, r2, c155
rcp r3.x, r3.x
dp4 r4.x, r2, c152
dp4 r4.y, r2, c153
dp4 r2.x, r2, c154
mul r2.z, r3.x, r2.x
mad r5, r4.xyxy, r3.x, r0.zwzy
mad r0, r4.xyxy, r3.x, r0.xwxy
mul r3.xyw, r5.zwzx, c4.xxzz
mul r2.xyw, r5.xyzx, c4.xxzz
texldl r4, r2, s12
mov r3.z, r2.z
mov r2.zw, r3
texldl r3, r3, s12
mov r4.y, r3.x
mov r3.zw, r2
mov r3.xy, r0.zwzw
mov r2.xy, r0
texldl r0, r2, s12
mov r4.z, r0.x
texldl r0, r3, s12
mov r4.w, r0.x
dp4 r0.x, r4, c4.w
add r0.x, r0.x, -c4.x
mov r2.x, c4.x
mad r0.x, c1.w, r0.x, r2.x
mad r0.yzw, v1.xxyz, -r1.w, c0.xxyz
dp3 r1.w, r0.yzww, r0.yzww
rsq r1.w, r1.w
mul r0.yzw, r0, r1.w
rcp r1.w, r1.w
mad_sat r1.w, r1.w, c2.x, c2.y
dp3 r2.x, r0.yzww, -c3
dp3_sat_pp r0.y, r1, r0.yzww
mad_sat r0.z, r2.x, c2.z, c2.w
mul r0.z, r0.z, r1.w
mul r1.xyz, r0.z, c1
mul_pp r0.xzw, r0.x, r1.xyyz
mul_pp r0.xyz, r0.xzww, r0.y
texld r1, v0, s14
add r1.xyz, r1, r1
mul_pp r0.xyz, r0, r1
mul_pp oC0.xyz, r0, c4.w
mov_pp oC0.w, c4.z

// approximately 55 instruction slots used (10 texture, 45 arithmetic)



PixelShader_79_CRC32_A31BCA63
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// struct
// {
// float4 f4_LightPos;
// float4 f4_Color;
// float4 f4_LightInfo;
// float4 f4_SpotDir;
// float4 f4_NormalAtt;
//
// } PS_Conic;
//
// struct
// {
// float4 f44_ViewInvLightInvProj[4];
// float4 f4_ShadowFetchConst;
//
// } PS_Normal;
//
// float4 ps_lightParamUnscale;
// sampler2D samp_Albedo;
// sampler2D samp_LightParam;
// sampler2D samp_Normal;
// sampler2D samp_ShadowZ;
//
//
// Registers:
//
// Name Reg Size
// -------------------- ----- ----
// PS_Conic c0 4
// PS_Normal c152 5
// ps_lightParamUnscale c218 1
// samp_ShadowZ s12 1
// samp_LightParam s13 1
// samp_Albedo s14 1
// samp_Normal s15 1
//

ps_3_0
def c4, -9.99999975e-005, -13.2877121, 1, 0.5
def c5, 1, 0, 0.25, 0
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xy
dcl_2d s12
dcl_2d s13
dcl_2d s14
dcl_2d s15
mul r0, c4.w, v2.xyxy
frc r0, r0
mad r0, r0, c156.x, c156.yyzz
mov r1.w, c4.z
texld r2, v0, s15
mul r3.xyz, r2.w, v1
mul r1.xyz, r3.z, v1
nrm_pp r4.xyz, r3
dp4 r3.x, r1, c155
rcp r3.x, r3.x
dp4 r5.x, r1, c152
dp4 r5.y, r1, c153
dp4 r1.x, r1, c154
mul r1.z, r3.x, r1.x
mad r6, r5.xyxy, r3.x, r0.zwzy
mad r0, r5.xyxy, r3.x, r0.xwxy
mul r3.xyw, r6.zwzx, c5.xxzy
mul r1.xyw, r6.xyzx, c5.xxzy
texldl r5, r1, s12
mov r3.z, r1.z
mov r1.zw, r3
texldl r3, r3, s12
mov r5.y, r3.x
mov r3.zw, r1
mov r3.xy, r0.zwzw
mov r1.xy, r0
texldl r0, r1, s12
mov r5.z, r0.x
texldl r0, r3, s12
mov r5.w, r0.x
dp4 r0.x, r5, c5.z
add r0.x, r0.x, -c4.z
mov r0.z, c4.z
mad r0.x, c1.w, r0.x, r0.z
mad r0.yzw, v1.xxyz, -r2.w, c0.xxyz
dp3 r1.x, r0.yzww, r0.yzww
rsq r1.x, r1.x
rcp r1.y, r1.x
mul r0.yzw, r0, r1.x
mad_sat r1.x, r1.y, c2.x, c2.y
dp3 r1.y, r0.yzww, -c3
mad_sat r1.y, r1.y, c2.z, c2.w
mul r1.x, r1.y, r1.x
mul r1.xyz, r1.x, c1
mul_pp r1.xyz, r0.x, r1
dp3 r0.x, r4, r2
add r0.x, r0.x, r0.x
mad r3.xyz, r2, -r0.x, r4
dp3_sat_pp r0.x, r2, r0.yzww
dp3_sat r0.y, r0.yzww, r3
mul_pp r0.xzw, r1.xyyz, r0.x
add r1.w, r0.y, c4.x
log r0.y, r0.y
cmp r0.y, r1.w, r0.y, c4.y
texld r2, v0, s13
mul r1.w, r2.y, c218.y
mul r0.y, r0.y, r1.w
exp_pp r0.y, r0.y
mul_pp r1.xyz, r1, r0.y
mul r1.xyz, r2.x, r1
texld r2, v0, s14
add r2.xyz, r2, r2
mad_pp r0.xyz, r0.xzww, r2, r1
mul_pp oC0.xyz, r0, c5.z
mov_pp oC0.w, c5.y

// approximately 71 instruction slots used (11 texture, 60 arithmetic)


PixelShader_103_CRC32_C1F8423D
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// struct
// {
// float4 f4_LightPos;
// float4 f4_Color;
// float4 f4_LightInfo;
// float4 f4_SpotDir;
// float4 f4_NormalAtt;
//
// } PS_Conic;
//
// struct
// {
// float4 f44_ViewInvLightInvProj[4];
// float4 f4_ShadowFetchConst;
//
// } PS_Normal;
//
// float4 ps_lightParamUnscale;
// sampler2D samp_Albedo;
// sampler2D samp_LightParam;
// sampler2D samp_Normal;
// sampler2D samp_ShadowMask;
// sampler2D samp_ShadowZ;
//
//
// Registers:
//
// Name Reg Size
// -------------------- ----- ----
// PS_Conic c0 5
// PS_Normal c152 5
// ps_lightParamUnscale c218 1
// samp_ShadowMask s9 1
// samp_ShadowZ s12 1
// samp_LightParam s13 1
// samp_Albedo s14 1
// samp_Normal s15 1
//

ps_3_0
def c5, 0.5, 1, 0, 0.25
def c6, -1, 1, -9.99999975e-005, -13.2877121
def c7, 4, -1, 0, 0
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xy
dcl_2d s9
dcl_2d s12
dcl_2d s13
dcl_2d s14
dcl_2d s15
mul r0, c5.x, v2.xyxy
frc r0, r0
mad r0, r0, c156.x, c156.yyzz
mov r1.w, c6.y
texld r2, v0, s15
mul r3.xyz, r2.w, v1
mul r1.xyz, r3.z, v1
nrm_pp r4.xyz, r3
dp4 r3.x, r1, c155
mul r5, r0, r3.x
mad r0, r5, c0.w, r0
rcp r3.x, r3.x
dp4 r5.x, r1, c152
dp4 r5.y, r1, c153
dp4 r5.z, r1, c154
mul r1.xyz, r3.x, r5
mad r6, r5.xyxy, r3.x, r0.zwzy
mad r0, r5.xyxy, r3.x, r0.xwxy
mul r3.xyw, r6.zwzx, c5.yyzz
mul r5.xyw, r6.xyzx, c5.yyzz
mov r5.z, r1.z
texld r1, r1, s9
mov r3.z, r5.z
texldl r5, r5, s12
mov r6.zw, r3
texldl r3, r3, s12
mov r5.y, r3.x
mov r3.zw, r6
mov r3.xy, r0.zwzw
mov r6.xy, r0
texldl r0, r6, s12
mov r5.z, r0.x
texldl r0, r3, s12
mov r5.w, r0.x
dp4 r0.x, r5, c5.w
mul r0.x, r0.x, c5.x
mul r0.x, r0.x, r1.x
mad r0.x, r0.x, c7.x, c7.y
mad r0.yzw, v1.xxyz, -r2.w, c0.xxyz
dp3 r1.x, r0.yzww, r0.yzww
rsq r1.x, r1.x
rcp r1.y, r1.x
mul r0.yzw, r0, r1.x
mad_sat r1.x, r1.y, c2.x, c2.y
pow r2.w, r1.x, c3.w
mul r1.y, r2.w, c1.w
mad r0.x, r1.y, r0.x, c6.y
dp3 r1.y, r0.yzww, -c3
mad_sat r1.y, r1.y, c2.z, c2.w
mul r1.x, r1.y, r1.x
mul r1.xyz, r1.x, c1
mul_pp r1.xyz, r0.x, r1
dp3 r0.x, r4, r2
add r0.x, r0.x, r0.x
mad r3.xyz, r2, -r0.x, r4
dp3_sat r0.x, r2, r0.yzww
dp3_sat r0.y, r0.yzww, r3
add r0.x, r0.x, c6.x
mov r2.y, c6.y
mad_pp r0.x, c4.x, r0.x, r2.y
mul_pp r0.xzw, r1.xyyz, r0.x
add r1.w, r0.y, c6.z
log r0.y, r0.y
cmp r0.y, r1.w, r0.y, c6.w
texld r2, v0, s13
mul r1.w, r2.y, c218.y
mul r0.y, r0.y, r1.w
exp_pp r0.y, r0.y
mul_pp r1.xyz, r1, r0.y
mul r1.xyz, r2.x, r1
texld r2, v0, s14
add r2.xyz, r2, r2
mad_pp r0.xyz, r0.xzww, r2, r1
mul_pp oC0.xyz, r0, c5.w
mov_pp oC0.w, c5.z

// approximately 83 instruction slots used (12 texture, 71 arithmetic)


PixelShader_349_CRC32_FBB6F3E5
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// struct
// {
// float4 f4_LightPos;
// float4 f4_Color;
// float4 f4_LightInfo;
// float4 f4_SpotDir;
// float4 f4_NormalAtt;
//
// } PS_Conic;
//
// struct
// {
// float4 f44_ViewInvLightInvProj[4];
// float4 f4_ShadowFetchConst;
//
// } PS_Normal;
//
// float4 ps_lightParamUnscale;
// sampler2D samp_Albedo;
// sampler2D samp_LightParam;
// sampler2D samp_Normal;
// sampler2D samp_ShadowMask;
// sampler2D samp_ShadowZ;
//
//
// Registers:
//
// Name Reg Size
// -------------------- ----- ----
// PS_Conic c0 4
// PS_Normal c152 5
// ps_lightParamUnscale c218 1
// samp_ShadowMask s9 1
// samp_ShadowZ s12 1
// samp_LightParam s13 1
// samp_Albedo s14 1
// samp_Normal s15 1
//

ps_3_0
def c4, -9.99999975e-005, -13.2877121, 1, 0.5
def c5, 1, 0, 0.25, -4
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xy
dcl_2d s9
dcl_2d s12
dcl_2d s13
dcl_2d s14
dcl_2d s15
mov r0.w, c4.z
texld r1, v0, s15
mul r2.xyz, r1.w, v1
mul r0.xyz, r2.z, v1
nrm_pp r3.xyz, r2
dp4 r2.z, r0, c154
dp4 r2.w, r0, c155
rcp r2.w, r2.w
dp4 r2.x, r0, c152
dp4 r2.y, r0, c153
mul r0.xyz, r2.w, r2
texld r4, r0, s9
mov r5.z, r0.z
mul r6, c4.w, v2.xyxy
frc r6, r6
mad r6, r6, c156.x, c156.yyzz
mad r7, r2.xyxy, r2.w, r6.zwzy
mad r2, r2.xyxy, r2.w, r6.xwxy
mul r5.xyw, r7.zwzx, c5.xxzy
mul r0.xyw, r7.xyzx, c5.xxzy
texldl r0, r0, s12
mov r6.zw, r5
texldl r5, r5, s12
mov r0.y, r5.x
mov r5.zw, r6
mov r5.xy, r2.zwzw
mov r6.xy, r2
texldl r2, r6, s12
mov r0.z, r2.x
texldl r2, r5, s12
mov r0.w, r2.x
dp4 r0.x, r0, c5.z
mul r0.x, r0.x, c4.w
mul r0.x, r0.x, r4.x
mad r0.x, r0.x, -c5.w, -c5.x
mov r0.z, c4.z
mad r0.x, c1.w, r0.x, r0.z
mad r0.yzw, v1.xxyz, -r1.w, c0.xxyz
dp3 r1.w, r0.yzww, r0.yzww
rsq r1.w, r1.w
rcp r2.x, r1.w
mul r0.yzw, r0, r1.w
mad_sat r1.w, r2.x, c2.x, c2.y
dp3 r2.x, r0.yzww, -c3
mad_sat r2.x, r2.x, c2.z, c2.w
mul r1.w, r1.w, r2.x
mul r2.xyz, r1.w, c1
mul_pp r2.xyz, r0.x, r2
dp3 r0.x, r3, r1
add r0.x, r0.x, r0.x
mad r3.xyz, r1, -r0.x, r3
dp3_sat_pp r0.x, r1, r0.yzww
dp3_sat r0.y, r0.yzww, r3
mul_pp r0.xzw, r2.xyyz, r0.x
add r1.x, r0.y, c4.x
log r0.y, r0.y
cmp r0.y, r1.x, r0.y, c4.y
texld r1, v0, s13
mul r1.y, r1.y, c218.y
mul r0.y, r0.y, r1.y
exp_pp r0.y, r0.y
mul_pp r1.yzw, r2.xxyz, r0.y
mul r1.xyz, r1.x, r1.yzww
texld r2, v0, s14
add r2.xyz, r2, r2
mad_pp r0.xyz, r0.xzww, r2, r1
mul_pp oC0.xyz, r0, c5.z
mov_pp oC0.w, c5.y

// approximately 74 instruction slots used (12 texture, 62 arithmetic)



I zeroed out (deleted the lines - is that right?) the o1 and that switched off the effect, But when I zeroed out the o2 I could clearly see the 2d effect of the torch, see screen shot.

I'm going to look at the prime directive, but somehow I managed to completely miss your wiki! So i'm going to go through all the tutorials and get my head in the 3d shader game!

#17
Posted 08/27/2015 10:12 AM   
I'm not sure those are the right PixelShader for the earlier VertexShader, because the input signature for these PixelShaders does not match the output signature of that VertexShader. (the dcl_* parts) Always possible, these things tend to be highly variable, but more experimentation would be in order to clarify exactly which texture is the problem. If you haven't gone through the classes yet, I'd definitely suggest that would be the first order of business. The main reason is that it fills in a lot of gaps, and we can then all use the same terminology, which keeps us from having to repeat things.
I'm not sure those are the right PixelShader for the earlier VertexShader, because the input signature for these PixelShaders does not match the output signature of that VertexShader. (the dcl_* parts)

Always possible, these things tend to be highly variable, but more experimentation would be in order to clarify exactly which texture is the problem.


If you haven't gone through the classes yet, I'd definitely suggest that would be the first order of business. The main reason is that it fills in a lot of gaps, and we can then all use the same terminology, which keeps us from having to repeat things.

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

#18
Posted 08/28/2015 06:25 AM   
Hello :-) At what stage of development is the fix? you gave up? :-)
Hello :-)

At what stage of development is the fix? you gave up? :-)

#19
Posted 09/13/2015 04:46 PM   
Not given up, but I've been a little busy and am slowly making my way though bo3b's shader school... Once I've got my head around that I'll go back to Zombi!
Not given up, but I've been a little busy and am slowly making my way though bo3b's shader school...

Once I've got my head around that I'll go back to Zombi!

#20
Posted 09/13/2015 09:13 PM   
ok :-), thank you, I would be patient ;-)
ok :-), thank you, I would be patient ;-)

#21
Posted 09/14/2015 10:09 AM   
Hmm, it's on sale for the weekend, $10 on Steam... tempted, someone talk me off the ledge? Lol... I bought it for Wii U but stopped playing it because I couldn't stand playing in 2D... or with that damn gamepad vs the wiimote's superior FPS controls.
Hmm, it's on sale for the weekend, $10 on Steam... tempted, someone talk me off the ledge? Lol... I bought it for Wii U but stopped playing it because I couldn't stand playing in 2D... or with that damn gamepad vs the wiimote's superior FPS controls.
#22
Posted 03/25/2016 01:03 AM   
If you played State of Decay... this will be a disappointment. If you havent play State of Decay.... go play state of decay. IMO. The stuff you do 20 mins into game is the same stuff you will be doing at the end. Its ok I guess. but Id wait for $5.00. Its only like 50% feedback on steam. I played wii u vers.
If you played State of Decay... this will be a disappointment.
If you havent play State of Decay.... go play state of decay.
IMO.

The stuff you do 20 mins into game is the same stuff you will be doing at the end. Its ok I guess.
but Id wait for $5.00. Its only like 50% feedback on steam. I played wii u vers.

Co-founder of helixmod.blog.com

If you like one of my helixmod patches and want to donate. Can send to me through paypal - eqzitara@yahoo.com

#23
Posted 03/25/2016 02:17 AM   
For those of you that understand this stuff, this game has a file called shaders. In this file is what appears to be some code that I would think isn't supposed to be in the retail version. Just one example of many [code] #include "include/CommonReg.fxh" #include "include/OpGeom.fxh" #include "include/UVMapperReg.fxh" #include "lighting/precompLighting.fxh" #include "include/ReadGBuffer.fxh" // Object parameters struct EDITOR_OBJ_CONST { hlsl_matrix44( m_matWorldViewProj ); hlsl_matrix44( m_matWorldView ); float4 f4_Bias; float4 f3_ExtraParam; }; struct EDITOR_VS_STRUCT_MAT { float4 f4_AtlasParam;// x = number of texture in atlas for UV channel 1 }; M_DECL_FCONST( EDITOR_VS_STRUCT_MAT, Editor_VS_Mat, 20); M_DECL_FCONST( EDITOR_OBJ_CONST, VS_EditorObjConst, 0); M_DECL_FCONST( float4, VS_f4_ElemColor, 10); M_DECL_BCONST( bool, VS_b_EditorUseVertexColor, 0); M_DECL_FCONST(float, PS_f_EditorSlope, 0); M_DECL_FCONST( float4, PS_f4_MaskThreshold, 1); M_DECL_BCONST( bool, PS_b_EditorDrawSlope, 0); M_DECL_SAMPLER( sampler2D, samp_EditorTexture, 0); M_DECL_SAMPLER( sampler2D, samp_EditorMask, 1); M_DECL_SAMPLER( samplerCUBE, samp_CubeMap, 0); struct PS_TEXRATIO_CONST { float4 f4_TexRatioFactor; // xy = Texel per mapping unit. float4 f4_GridColor; float4 f4_MipColor; float4 f4_OverColor; float4 f4_MipFactor; }; M_DECL_FCONST( PS_TEXRATIO_CONST, ps_TexRatioConst, 0); M_DECL_FCONST(float4, PS_UV2Color, 0); M_DECL_FCONST(float4, VS_UV2InvAspectRatio, 0); #ifndef __cplusplus // Structures struct VS_BASIC_OUTPUT { float4 Position : POSITION; // Vertex position float4 Diffuse : COLOR0_C; // Vertex color float2 UV : TEXCOORD0; // Vertex UV }; struct PS_OUTPUT { float4 RGBColor0 : COLOR0; // Pixel color }; //**************************************************************** // "Basic Color" Shader //**************************************************************** void VS_BasicColor( out float4 oPos : POSITION, out float4 oDiffuse : COLOR0_C, in float4 vPos : POSITION, in float4 vDiffuse : COLOR0 DECL_GEOM_PARAM DECL_INSTANCING_PARAM) { uncompressPos(vPos); #if (USE_ANY_GEOM == 1) OpGeomPos( vPos, GET_GEOM_PARAM, VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, vPos ); f3_NewPos.y = dot( f4_InstMat1, vPos ); f3_NewPos.z = dot( f4_InstMat2, vPos ); vPos.xyz = f3_NewPos; #endif oPos = hlsl_mul(float4(vPos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); // Depth Bias float4 Pos1 = hlsl_mul(float4(vPos.xyz,1), VS_EditorObjConst.m_matWorldView); oPos.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z); if(VS_b_EditorUseVertexColor) oDiffuse = VS_f4_ElemColor * vDiffuse; else oDiffuse = VS_f4_ElemColor; } float4 PS_BasicColor(in float4 vColor : COLOR0_C) : COLOR { return vColor; } #ifndef _GLSL_ technique tech_BasicColor { pass p0 { VertexShader = compile vs_2_0 VS_BasicColor(); PixelShader = compile ps_2_0 PS_BasicColor(); } }; #endif //**************************************************************** // "Basic Tex" Shader //**************************************************************** VS_BASIC_OUTPUT VS_BasicTex(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0 DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_BASIC_OUTPUT Output; float4 Pos1; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); // Depth Bias Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z); if(VS_b_EditorUseVertexColor) Output.Diffuse = VS_f4_ElemColor * Diffuse; else Output.Diffuse = VS_f4_ElemColor; Output.UV = UV; return Output; } float4 PS_BasicTex(VS_BASIC_OUTPUT In) : COLOR { return In.Diffuse * tex2D( samp_EditorTexture, In.UV ); } #ifndef _GLSL_ technique tech_BasicTex { pass p0 { VertexShader = compile vs_3_0 VS_BasicTex(); PixelShader = compile ps_3_0 PS_BasicTex(); } }; #endif //**************************************************************** // "Basic Tex With Mask" Shader //**************************************************************** // Structures struct VS_BASICMASK_OUTPUT { float4 Position : POSITION; // Vertex position float4 UV : TEXCOORD0; // Vertex UV xy: diffuse ; zw:mask #ifdef USE_XYZ_MAPPING float4 objPos : TEXCOORD1; float4 objNormal: TEXCOORD2; #endif }; VS_BASICMASK_OUTPUT VS_BasicTexWithMask(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0 #ifdef USE_XYZ_MAPPING , float3 Normal : NORMAL #endif DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_BASICMASK_OUTPUT Output; float4 Pos1; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); // Depth Bias Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z); #ifdef USE_XYZ_MAPPING float3 normalIn = Normal * 2 - 1; Output.objPos.xyz = Pos.xyz; Output.objNormal.xyz= normalIn; Output.objPos.w = length(VS_UVConst.mat_UV1[0].xyz); Output.objNormal.w = length(VS_UVConst.mat_UV1[1].xyz); Output.UV = UV.xyxy; #else Output.UV.xy = ComputeSourceUV1(UV, Pos); Output.UV.zw = ComputeSourceUV2(UV, Pos); // mask #endif return Output; } float4 PS_BasicTexWithMask(VS_BASICMASK_OUTPUT In) : COLOR { #ifdef USE_XYZ_MAPPING float3 objNrm = abs(In.objNormal.xyz); float3 objPos = In.objPos.xyz; if ( objNrm.x >= max(objNrm.y, objNrm.z) ) { In.UV.xy = objPos.yz; } else if ( objNrm.y >= max(objNrm.x, objNrm.z) ) { In.UV.xy = objPos.xz; } else { In.UV.xy = objPos.xy; } In.UV.xy *= float2(In.objPos.w, In.objNormal.w); In.UV.zw = In.UV.xy; #endif float4 f4_tex = tex2D( samp_EditorTexture, In.UV.xy ); float4 f4_Mask = tex2D(samp_EditorMask, In.UV.zw); clip(f4_Mask.a - PS_f4_MaskThreshold.x); return f4_tex; } #ifndef _GLSL_ technique tech_BasicTexWithMask { pass p0 { VertexShader = compile vs_3_0 VS_BasicTexWithMask(); PixelShader = compile ps_3_0 PS_BasicTexWithMask(); } }; #endif //**************************************************************** // "Facet" shader //**************************************************************** struct VS_FACET_OUTPUT { float4 Position : POSITION; // Vertex position float4 Diffuse : COLOR0_C; // Vertex color float3 PosLocal : TEXCOORD0; float3 PosView : TEXCOORD1; }; VS_FACET_OUTPUT VS_Facet(float4 Pos : POSITION, float4 VertexColor : COLOR0 DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_FACET_OUTPUT Output; float4 Pos1; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif // Per face Color Output.Diffuse = VS_f4_ElemColor; if(VS_b_EditorUseVertexColor) Output.Diffuse *= VertexColor; Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); // Depth Bias Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z); Output.PosView = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView).xyz; Output.PosLocal = Pos.xyz; return Output; } float4 PS_Facet(VS_FACET_OUTPUT In) : COLOR { float3 f3_AxisX = normalize( ddx( In.PosView ) ); float3 f3_AxisY = normalize( ddy( In.PosView ) ); float3 f3_Normal = normalize( cross( f3_AxisX, f3_AxisY ) ); float4 f4_Color; float t = 0.3f + (abs(f3_Normal.z) * 0.7f); if(PS_b_EditorDrawSlope) { f3_AxisX = normalize( ddx( In.PosLocal ) ); f3_AxisY = normalize( ddy( In.PosLocal ) ); f3_Normal = normalize( cross( f3_AxisX, f3_AxisY ) ); if(abs(normalize(f3_Normal).z) < cos(PS_f_EditorSlope * 3.14159 / 180)) f4_Color = t * float4(0, 0.5,0.5, 1.00); //0xFF808000; else f4_Color = t * float4(0.5, 0.2, 0, 1.0); //0xFF003380; } else { f4_Color = In.Diffuse * t; } return f4_Color; } #ifndef _GLSL_ technique tech_Facet { pass p0 { VertexShader = compile vs_3_0 VS_Facet(); PixelShader = compile ps_3_0 PS_Facet(); } }; #endif //**************************************************************** // Texel ratio shader //**************************************************************** struct VS_TEXRATIO_OUTPUT { float4 Position : POSITION; // Vertex position float2 UV : TEXCOORD0; // Vertex UV float3 ViewPos : TEXCOORD1; }; VS_TEXRATIO_OUTPUT VS_TexelRatio(float4 Pos : POSITION, #ifdef TEXRATIO_USE_UV2 float2 f2_Texcoord : TEXCOORD1 #else float2 f2_Texcoord : TEXCOORD0 #endif DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_TEXRATIO_OUTPUT Out; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Out.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); Out.ViewPos = hlsl_mul43(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); float4 f4_UVSrc = ComputeSourceUV(f2_Texcoord, usePlanar1(), Pos); Out.UV = f4_UVSrc.xy; return Out; } float ComputeGrid( float2 f2_UV, float f_Scale ) { float2 f2_Tmp = frac( f2_UV / (2.0f * f_Scale) ); f2_Tmp = f2_Tmp > 0.5f; return ( f2_Tmp.x + f2_Tmp.y == 1.0f ); } float4 PS_TexelRatio(VS_TEXRATIO_OUTPUT In) : COLOR { float2 f2_TexRatio; float f_Alpha; f2_TexRatio = In.UV * ps_TexRatioConst.f4_TexRatioFactor.xy; float2 f2_dx = ddx( f2_TexRatio ); float2 f2_dy = ddy( f2_TexRatio ); float2 f2_UVDeriv = float2( length( f2_dx ), length( f2_dy ) ); float3 f3_Posdx = ddx( In.ViewPos ); float3 f3_Posdy = ddy( In.ViewPos ); float2 f2_PosDeriv = float2( length( f3_Posdx ), length( f3_Posdy ) ); float2 f2_TexRatioN = f2_UVDeriv / f2_PosDeriv; f2_TexRatioN /= ps_TexRatioConst.f4_TexRatioFactor.z; float f_Int = ComputeGrid( f2_TexRatio, ps_TexRatioConst.f4_TexRatioFactor.w ); float4 f4_Color = ps_TexRatioConst.f4_GridColor; f2_UVDeriv *= ps_TexRatioConst.f4_MipFactor.xy; f_Alpha = saturate( 2.0f - min( f2_UVDeriv.x, f2_UVDeriv.y ) ); f4_Color.z *= f_Alpha; // if ( ( f2_UVDeriv.x > 2.0f ) && ( f2_UVDeriv.y > 2.0f ) ) // f4_Color = ps_TexRatioConst.f4_MipColor; f_Alpha = saturate( 2.0f - ( f2_TexRatioN.x * f2_TexRatioN.y ) ); f4_Color.y *= f_Alpha; //f4_Color = lerp( f4_Color, ps_TexRatioConst.f4_OverColor, f_Alpha ); f4_Color *= f_Int; f4_Color.w = 1.0f; return f4_Color; } #ifndef _GLSL_ technique tech_TexelRatio { pass p0 { VertexShader = compile vs_3_0 VS_TexelRatio(); PixelShader = compile ps_3_0 PS_TexelRatio(); } }; #endif //**************************************************************** // Show UV2 shader //**************************************************************** void VS_ShowUV2Mesh(out float4 _outPos: POSITION, out float2 _outUV2: TEXCOORD0, out float3 _outNorm: TEXCOORD1, in float4 _inPos: POSITION, in float3 _inNorm: NORMAL, in float2 _inUV2: TEXCOORD1 DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { uncompressPos(_inPos); #if (USE_ANY_GEOM == 1) OpGeomPos( _inPos, GET_GEOM_PARAM, VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, _inPos ); f3_NewPos.y = dot( f4_InstMat1, _inPos ); f3_NewPos.z = dot( f4_InstMat2, _inPos ); _inPos.xyz = f3_NewPos; #endif _outPos = hlsl_mul(float4(_inPos.xyz, 1), VS_EditorObjConst.m_matWorldViewProj); _outUV2 = _inUV2; _outNorm = normalize(hlsl_mul(_inNorm, VS_EditorObjConst.m_matWorldView)); } float4 PS_ShowUV2Mesh(float2 _uv2: TEXCOORD0, float3 _normal: TEXCOORD1) : COLOR { float4 uv2color = tex2D(samp_EditorTexture, _uv2) * PS_UV2Color; uv2color.rgb = uv2color.rgb * abs(_normal.y) * 0.7 + 0.3; return uv2color; } #ifndef _GLSL_ technique tech_ShowUV2Mesh { pass p0 { VertexShader = compile vs_3_0 VS_ShowUV2Mesh(); PixelShader = compile ps_3_0 PS_ShowUV2Mesh(); } }; #endif //----------------------------------------------------------------------------- void VS_ShowUV2Coverage(out float4 _outPos: POSITION, in float4 _inPos: POSITION, in float2 _inUV2: TEXCOORD1) { // Center on screen _outPos = float4((_inUV2 * 2 - 1) * 0.75 * VS_UV2InvAspectRatio.xy, 0.0, 1.0); } float4 PS_ShowUV2Coverage() : COLOR { return PS_UV2Color; } #ifndef _GLSL_ technique tech_ShowUV2Coverage { pass p0 { VertexShader = compile vs_3_0 VS_ShowUV2Coverage(); PixelShader = compile ps_3_0 PS_ShowUV2Coverage(); } }; #endif //**************************************************************** // Pixel Normal Shader //**************************************************************** struct VS_PXNORMAL_OUTPUT { float4 Position : POSITION; // Vertex position float3 Normal : TEXCOORD0; // Vertex Normal }; VS_PXNORMAL_OUTPUT VS_PixelNormal(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0, float3 Normal : NORMAL DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_PXNORMAL_OUTPUT Output; float4 Pos1; float fweight; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); Output.Normal = Normal; return Output; } float4 PS_PixelNormal(VS_PXNORMAL_OUTPUT In) : COLOR { return float4(In.Normal.xyz, 1); // return float4(In.Normal.x, 0, In.Normal.y, 1); } #ifndef _GLSL_ technique tech_PixelNormal { pass p0 { VertexShader = compile vs_3_0 VS_PixelNormal(); PixelShader = compile ps_3_0 PS_PixelNormal(); } }; #endif //**************************************************************** // SH Probes //**************************************************************** struct VS_SHPROBE_OUTPUT { float4 Position : POSITION; // Vertex position float4 NormalZ : TEXCOORD0; // Vertex Normal float2 Texcoord : TEXCOORD1; }; VS_SHPROBE_OUTPUT VS_SHProbe_Render(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0, float3 Normal : NORMAL DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_SHPROBE_OUTPUT Output; float4 Pos1; float fweight; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); float3 f3_ViewPos = hlsl_mul43(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); float3 normal = Normal.xyz*2.0f-1.0f; //normal = hlsl_mul( normal.xyz, ps_GlobalLighting.mViewI); normal = hlsl_mul(normal.xyz, VS_EditorObjConst.m_matWorldView); Output.NormalZ = float4(normalize(normal), f3_ViewPos.z); Output.Texcoord = UV; return Output; } GBuffer_ps_Output PS_SHProbe_Render(VS_SHPROBE_OUTPUT In) : COLOR { half3 norm = (half3)normalize(In.NormalZ.xyz); half4 sh = GetPrecompLightingAndShadow((half2)In.Texcoord, half3(0,0,1), norm); GBufferData data; #ifdef SHOW_LIGHTING_ONLY data.albedo.rgb = 0.5; #else data.albedo.rgb = 1.0; #endif data.shadow = sh.a; data.normal.xyz = norm.xyz; // TODO: view-space data.depth = In.NormalZ.w; data.specIntensity = 0; data.specPower = 0; data.cubeSpecIntensity = 0; data.cubeSpecBlur = 0; data.lightmap = sh.rgb; data.dynamic = 0; return GBufferWrite(data); } #ifndef _GLSL_ technique tech_SHProbe_Render { pass p0 { VertexShader = compile vs_3_0 VS_SHProbe_Render(); PixelShader = compile ps_3_0 PS_SHProbe_Render(); } }; #endif VS_SHPROBE_OUTPUT VS_SHProbe_Picking(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0, float3 Normal : NORMAL DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_SHPROBE_OUTPUT Output; float4 Pos1; float fweight; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); Output.NormalZ.xyz = VS_f4_ElemColor.xyz; Output.NormalZ.w = 0; Output.Texcoord = UV; return Output; } float4 PS_SHProbe_Picking(VS_SHPROBE_OUTPUT In) : COLOR { return float4(In.NormalZ.rgb,0); } #ifndef _GLSL_ technique tech_SHProbe_Picking { pass p0 { VertexShader = compile vs_3_0 VS_SHProbe_Picking(); PixelShader = compile ps_3_0 PS_SHProbe_Picking(); } }; #endif VS_SHPROBE_OUTPUT VS_SHProbe_PickingZ(float4 Pos : POSITION, float4 Diffuse : COLOR0, float2 UV : TEXCOORD0, float3 Normal : NORMAL DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_SHPROBE_OUTPUT Output; float4 Pos1; float fweight; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); Output.NormalZ.x = 1.0f / (Output.Position.z); Output.NormalZ.y = Output.Position.z; Output.NormalZ.zw = 0; Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); Output.Texcoord = UV; return Output; } float4 PS_SHProbe_PickingZ(VS_SHPROBE_OUTPUT In) : COLOR { float4 f4_Color; int i1; f4_Color.a = 1.0 / In.NormalZ.y; if (f4_Color.a <= 0) { f4_Color = 0; } else { if ( f4_Color.a >= 1.0 ) { f4_Color.r = 128; while ( f4_Color.a > 1.0f ) { f4_Color.r += 1; f4_Color.a /= 2; } } else { f4_Color.r = 129; while ( f4_Color.a < 1.0f ) { f4_Color.r -= 1; f4_Color.a*= 2; } f4_Color.a/=2; } f4_Color.r /= 255.0f; i1 = f4_Color.a * 255.0f; f4_Color.a *= 255.0f; f4_Color.a -= i1; f4_Color.g = i1 / 255.0f; i1 = (int) (f4_Color.a * 255.0f); f4_Color.a *= 255.0f; f4_Color.a -= i1; f4_Color.b = i1 / 255.0f; f4_Color.a = f4_Color.a; } return f4_Color; } #ifndef _GLSL_ technique tech_SHProbe_PickingZ { pass p0 { VertexShader = compile vs_3_0 VS_SHProbe_PickingZ(); PixelShader = compile ps_3_0 PS_SHProbe_PickingZ(); } }; #endif //**************************************************************** // Cube map Shader //**************************************************************** struct VS_CUBEMAP_OUTPUT { float4 Position : POSITION; // Vertex position float4 Diffuse : COLOR0_C; // Vertex color float3 Normal : NORMAL0; }; VS_CUBEMAP_OUTPUT VS_CubeMap(float4 Pos : POSITION, float4 Diffuse : COLOR0, float3 normal : NORMAL DECL_GEOM_PARAM DECL_INSTANCING_PARAM ) { VS_CUBEMAP_OUTPUT Output; float4 Pos1; uncompressPos(Pos); #if (USE_ANY_GEOM == 1) OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz ); #endif #ifdef USE_INSTANCING float3 f3_NewPos; f3_NewPos.x = dot( f4_InstMat0, Pos ); f3_NewPos.y = dot( f4_InstMat1, Pos ); f3_NewPos.z = dot( f4_InstMat2, Pos ); Pos.xyz = f3_NewPos; #endif Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj); // Depth Bias Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView); Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z); Output.Diffuse = 1; Output.Normal = normal * 2.0f - 1.0f; return Output; } float4 PS_CubeMap(VS_CUBEMAP_OUTPUT In) : COLOR { return In.Diffuse * texCUBE( samp_CubeMap, In.Normal ); } #ifndef _GLSL_ technique tech_CubeMap { pass p0 { VertexShader = compile vs_3_0 VS_CubeMap(); PixelShader = compile ps_3_0 PS_CubeMap(); } }; #endif #endif // __cplusplus [/code]
For those of you that understand this stuff, this game has a file called shaders.

In this file is what appears to be some code that I would think isn't supposed to be in the retail version.

Just one example of many

#include "include/CommonReg.fxh"
#include "include/OpGeom.fxh"
#include "include/UVMapperReg.fxh"
#include "lighting/precompLighting.fxh"
#include "include/ReadGBuffer.fxh"

// Object parameters
struct EDITOR_OBJ_CONST
{
hlsl_matrix44( m_matWorldViewProj );
hlsl_matrix44( m_matWorldView );
float4 f4_Bias;
float4 f3_ExtraParam;
};

struct EDITOR_VS_STRUCT_MAT
{
float4 f4_AtlasParam;// x = number of texture in atlas for UV channel 1
};
M_DECL_FCONST( EDITOR_VS_STRUCT_MAT, Editor_VS_Mat, 20);

M_DECL_FCONST( EDITOR_OBJ_CONST, VS_EditorObjConst, 0);
M_DECL_FCONST( float4, VS_f4_ElemColor, 10);

M_DECL_BCONST( bool, VS_b_EditorUseVertexColor, 0);

M_DECL_FCONST(float, PS_f_EditorSlope, 0);
M_DECL_FCONST( float4, PS_f4_MaskThreshold, 1);
M_DECL_BCONST( bool, PS_b_EditorDrawSlope, 0);

M_DECL_SAMPLER( sampler2D, samp_EditorTexture, 0);
M_DECL_SAMPLER( sampler2D, samp_EditorMask, 1);
M_DECL_SAMPLER( samplerCUBE, samp_CubeMap, 0);

struct PS_TEXRATIO_CONST
{
float4 f4_TexRatioFactor; // xy = Texel per mapping unit.
float4 f4_GridColor;
float4 f4_MipColor;
float4 f4_OverColor;
float4 f4_MipFactor;
};

M_DECL_FCONST( PS_TEXRATIO_CONST, ps_TexRatioConst, 0);
M_DECL_FCONST(float4, PS_UV2Color, 0);
M_DECL_FCONST(float4, VS_UV2InvAspectRatio, 0);

#ifndef __cplusplus

// Structures

struct VS_BASIC_OUTPUT
{
float4 Position : POSITION; // Vertex position
float4 Diffuse : COLOR0_C; // Vertex color
float2 UV : TEXCOORD0; // Vertex UV
};
struct PS_OUTPUT
{
float4 RGBColor0 : COLOR0; // Pixel color
};


//****************************************************************
// "Basic Color" Shader
//****************************************************************

void VS_BasicColor( out float4 oPos : POSITION,
out float4 oDiffuse : COLOR0_C,
in float4 vPos : POSITION,
in float4 vDiffuse : COLOR0
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM)
{
uncompressPos(vPos);
#if (USE_ANY_GEOM == 1)
OpGeomPos( vPos, GET_GEOM_PARAM, VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, vPos );
f3_NewPos.y = dot( f4_InstMat1, vPos );
f3_NewPos.z = dot( f4_InstMat2, vPos );
vPos.xyz = f3_NewPos;
#endif

oPos = hlsl_mul(float4(vPos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

// Depth Bias
float4 Pos1 = hlsl_mul(float4(vPos.xyz,1), VS_EditorObjConst.m_matWorldView);
oPos.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z);

if(VS_b_EditorUseVertexColor)
oDiffuse = VS_f4_ElemColor * vDiffuse;
else
oDiffuse = VS_f4_ElemColor;
}

float4 PS_BasicColor(in float4 vColor : COLOR0_C) : COLOR
{
return vColor;
}

#ifndef _GLSL_
technique tech_BasicColor
{
pass p0
{
VertexShader = compile vs_2_0 VS_BasicColor();
PixelShader = compile ps_2_0 PS_BasicColor();
}
};
#endif

//****************************************************************
// "Basic Tex" Shader
//****************************************************************

VS_BASIC_OUTPUT VS_BasicTex(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_BASIC_OUTPUT Output;
float4 Pos1;
uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

// Depth Bias
Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);
Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z);

if(VS_b_EditorUseVertexColor)
Output.Diffuse = VS_f4_ElemColor * Diffuse;
else
Output.Diffuse = VS_f4_ElemColor;
Output.UV = UV;
return Output;
}

float4 PS_BasicTex(VS_BASIC_OUTPUT In) : COLOR
{
return In.Diffuse * tex2D( samp_EditorTexture, In.UV );
}

#ifndef _GLSL_
technique tech_BasicTex
{
pass p0
{
VertexShader = compile vs_3_0 VS_BasicTex();
PixelShader = compile ps_3_0 PS_BasicTex();
}
};
#endif

//****************************************************************
// "Basic Tex With Mask" Shader
//****************************************************************

// Structures

struct VS_BASICMASK_OUTPUT
{
float4 Position : POSITION; // Vertex position
float4 UV : TEXCOORD0; // Vertex UV xy: diffuse ; zw:mask
#ifdef USE_XYZ_MAPPING
float4 objPos : TEXCOORD1;
float4 objNormal: TEXCOORD2;
#endif
};

VS_BASICMASK_OUTPUT VS_BasicTexWithMask(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0
#ifdef USE_XYZ_MAPPING
, float3 Normal : NORMAL
#endif
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_BASICMASK_OUTPUT Output;
float4 Pos1;
uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

// Depth Bias
Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);
Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z);

#ifdef USE_XYZ_MAPPING
float3 normalIn = Normal * 2 - 1;
Output.objPos.xyz = Pos.xyz;
Output.objNormal.xyz= normalIn;
Output.objPos.w = length(VS_UVConst.mat_UV1[0].xyz);
Output.objNormal.w = length(VS_UVConst.mat_UV1[1].xyz);
Output.UV = UV.xyxy;
#else
Output.UV.xy = ComputeSourceUV1(UV, Pos);
Output.UV.zw = ComputeSourceUV2(UV, Pos); // mask
#endif
return Output;
}

float4 PS_BasicTexWithMask(VS_BASICMASK_OUTPUT In) : COLOR
{
#ifdef USE_XYZ_MAPPING
float3 objNrm = abs(In.objNormal.xyz);
float3 objPos = In.objPos.xyz;
if ( objNrm.x >= max(objNrm.y, objNrm.z) )
{
In.UV.xy = objPos.yz;
}
else if ( objNrm.y >= max(objNrm.x, objNrm.z) )
{
In.UV.xy = objPos.xz;
}
else
{
In.UV.xy = objPos.xy;
}
In.UV.xy *= float2(In.objPos.w, In.objNormal.w);
In.UV.zw = In.UV.xy;
#endif

float4 f4_tex = tex2D( samp_EditorTexture, In.UV.xy );
float4 f4_Mask = tex2D(samp_EditorMask, In.UV.zw);
clip(f4_Mask.a - PS_f4_MaskThreshold.x);

return f4_tex;
}

#ifndef _GLSL_
technique tech_BasicTexWithMask
{
pass p0
{
VertexShader = compile vs_3_0 VS_BasicTexWithMask();
PixelShader = compile ps_3_0 PS_BasicTexWithMask();
}
};
#endif

//****************************************************************
// "Facet" shader
//****************************************************************

struct VS_FACET_OUTPUT
{
float4 Position : POSITION; // Vertex position
float4 Diffuse : COLOR0_C; // Vertex color
float3 PosLocal : TEXCOORD0;
float3 PosView : TEXCOORD1;
};

VS_FACET_OUTPUT VS_Facet(float4 Pos : POSITION,
float4 VertexColor : COLOR0
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_FACET_OUTPUT Output;
float4 Pos1;
uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

// Per face Color
Output.Diffuse = VS_f4_ElemColor;

if(VS_b_EditorUseVertexColor)
Output.Diffuse *= VertexColor;

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

// Depth Bias
Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);
Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z);

Output.PosView = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView).xyz;
Output.PosLocal = Pos.xyz;

return Output;
}

float4 PS_Facet(VS_FACET_OUTPUT In) : COLOR
{
float3 f3_AxisX = normalize( ddx( In.PosView ) );
float3 f3_AxisY = normalize( ddy( In.PosView ) );
float3 f3_Normal = normalize( cross( f3_AxisX, f3_AxisY ) );
float4 f4_Color;

float t = 0.3f + (abs(f3_Normal.z) * 0.7f);

if(PS_b_EditorDrawSlope)
{
f3_AxisX = normalize( ddx( In.PosLocal ) );
f3_AxisY = normalize( ddy( In.PosLocal ) );
f3_Normal = normalize( cross( f3_AxisX, f3_AxisY ) );

if(abs(normalize(f3_Normal).z) < cos(PS_f_EditorSlope * 3.14159 / 180))
f4_Color = t * float4(0, 0.5,0.5, 1.00); //0xFF808000;
else
f4_Color = t * float4(0.5, 0.2, 0, 1.0); //0xFF003380;

}
else
{
f4_Color = In.Diffuse * t;

}

return f4_Color;
}

#ifndef _GLSL_
technique tech_Facet
{
pass p0
{
VertexShader = compile vs_3_0 VS_Facet();
PixelShader = compile ps_3_0 PS_Facet();
}
};
#endif

//****************************************************************
// Texel ratio shader
//****************************************************************

struct VS_TEXRATIO_OUTPUT
{
float4 Position : POSITION; // Vertex position
float2 UV : TEXCOORD0; // Vertex UV
float3 ViewPos : TEXCOORD1;
};

VS_TEXRATIO_OUTPUT VS_TexelRatio(float4 Pos : POSITION,
#ifdef TEXRATIO_USE_UV2
float2 f2_Texcoord : TEXCOORD1
#else
float2 f2_Texcoord : TEXCOORD0
#endif
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_TEXRATIO_OUTPUT Out;

uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Out.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);
Out.ViewPos = hlsl_mul43(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);

float4 f4_UVSrc = ComputeSourceUV(f2_Texcoord, usePlanar1(), Pos);
Out.UV = f4_UVSrc.xy;

return Out;
}

float ComputeGrid( float2 f2_UV, float f_Scale )
{
float2 f2_Tmp = frac( f2_UV / (2.0f * f_Scale) );
f2_Tmp = f2_Tmp > 0.5f;
return ( f2_Tmp.x + f2_Tmp.y == 1.0f );
}

float4 PS_TexelRatio(VS_TEXRATIO_OUTPUT In) : COLOR
{
float2 f2_TexRatio;
float f_Alpha;

f2_TexRatio = In.UV * ps_TexRatioConst.f4_TexRatioFactor.xy;
float2 f2_dx = ddx( f2_TexRatio );
float2 f2_dy = ddy( f2_TexRatio );
float2 f2_UVDeriv = float2( length( f2_dx ), length( f2_dy ) );

float3 f3_Posdx = ddx( In.ViewPos );
float3 f3_Posdy = ddy( In.ViewPos );
float2 f2_PosDeriv = float2( length( f3_Posdx ), length( f3_Posdy ) );
float2 f2_TexRatioN = f2_UVDeriv / f2_PosDeriv;
f2_TexRatioN /= ps_TexRatioConst.f4_TexRatioFactor.z;

float f_Int = ComputeGrid( f2_TexRatio, ps_TexRatioConst.f4_TexRatioFactor.w );
float4 f4_Color = ps_TexRatioConst.f4_GridColor;

f2_UVDeriv *= ps_TexRatioConst.f4_MipFactor.xy;
f_Alpha = saturate( 2.0f - min( f2_UVDeriv.x, f2_UVDeriv.y ) );
f4_Color.z *= f_Alpha;
// if ( ( f2_UVDeriv.x > 2.0f ) && ( f2_UVDeriv.y > 2.0f ) )
// f4_Color = ps_TexRatioConst.f4_MipColor;

f_Alpha = saturate( 2.0f - ( f2_TexRatioN.x * f2_TexRatioN.y ) );
f4_Color.y *= f_Alpha;
//f4_Color = lerp( f4_Color, ps_TexRatioConst.f4_OverColor, f_Alpha );

f4_Color *= f_Int;
f4_Color.w = 1.0f;

return f4_Color;
}

#ifndef _GLSL_
technique tech_TexelRatio
{
pass p0
{
VertexShader = compile vs_3_0 VS_TexelRatio();
PixelShader = compile ps_3_0 PS_TexelRatio();
}
};
#endif


//****************************************************************
// Show UV2 shader
//****************************************************************
void VS_ShowUV2Mesh(out float4 _outPos: POSITION,
out float2 _outUV2: TEXCOORD0,
out float3 _outNorm: TEXCOORD1,
in float4 _inPos: POSITION,
in float3 _inNorm: NORMAL,
in float2 _inUV2: TEXCOORD1
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
uncompressPos(_inPos);
#if (USE_ANY_GEOM == 1)
OpGeomPos( _inPos, GET_GEOM_PARAM, VS_EditorObjConst.f3_ExtraParam.xyz );
#endif
#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, _inPos );
f3_NewPos.y = dot( f4_InstMat1, _inPos );
f3_NewPos.z = dot( f4_InstMat2, _inPos );
_inPos.xyz = f3_NewPos;
#endif

_outPos = hlsl_mul(float4(_inPos.xyz, 1), VS_EditorObjConst.m_matWorldViewProj);
_outUV2 = _inUV2;
_outNorm = normalize(hlsl_mul(_inNorm, VS_EditorObjConst.m_matWorldView));
}

float4 PS_ShowUV2Mesh(float2 _uv2: TEXCOORD0, float3 _normal: TEXCOORD1) : COLOR
{
float4 uv2color = tex2D(samp_EditorTexture, _uv2) * PS_UV2Color;
uv2color.rgb = uv2color.rgb * abs(_normal.y) * 0.7 + 0.3;
return uv2color;
}

#ifndef _GLSL_
technique tech_ShowUV2Mesh
{
pass p0
{
VertexShader = compile vs_3_0 VS_ShowUV2Mesh();
PixelShader = compile ps_3_0 PS_ShowUV2Mesh();
}
};
#endif

//-----------------------------------------------------------------------------
void VS_ShowUV2Coverage(out float4 _outPos: POSITION,
in float4 _inPos: POSITION,
in float2 _inUV2: TEXCOORD1)
{
// Center on screen
_outPos = float4((_inUV2 * 2 - 1) * 0.75 * VS_UV2InvAspectRatio.xy, 0.0, 1.0);
}

float4 PS_ShowUV2Coverage() : COLOR
{
return PS_UV2Color;
}

#ifndef _GLSL_
technique tech_ShowUV2Coverage
{
pass p0
{
VertexShader = compile vs_3_0 VS_ShowUV2Coverage();
PixelShader = compile ps_3_0 PS_ShowUV2Coverage();
}
};
#endif

//****************************************************************
// Pixel Normal Shader
//****************************************************************

struct VS_PXNORMAL_OUTPUT
{
float4 Position : POSITION; // Vertex position
float3 Normal : TEXCOORD0; // Vertex Normal
};


VS_PXNORMAL_OUTPUT VS_PixelNormal(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0,
float3 Normal : NORMAL
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_PXNORMAL_OUTPUT Output;
float4 Pos1;
float fweight;

uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

Output.Normal = Normal;

return Output;
}

float4 PS_PixelNormal(VS_PXNORMAL_OUTPUT In) : COLOR
{
return float4(In.Normal.xyz, 1);
// return float4(In.Normal.x, 0, In.Normal.y, 1);
}

#ifndef _GLSL_
technique tech_PixelNormal
{
pass p0
{
VertexShader = compile vs_3_0 VS_PixelNormal();
PixelShader = compile ps_3_0 PS_PixelNormal();
}
};
#endif

//****************************************************************
// SH Probes
//****************************************************************

struct VS_SHPROBE_OUTPUT
{
float4 Position : POSITION; // Vertex position
float4 NormalZ : TEXCOORD0; // Vertex Normal
float2 Texcoord : TEXCOORD1;
};


VS_SHPROBE_OUTPUT VS_SHProbe_Render(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0,
float3 Normal : NORMAL
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_SHPROBE_OUTPUT Output;
float4 Pos1;
float fweight;

uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);
float3 f3_ViewPos = hlsl_mul43(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);

float3 normal = Normal.xyz*2.0f-1.0f;
//normal = hlsl_mul( normal.xyz, ps_GlobalLighting.mViewI);
normal = hlsl_mul(normal.xyz, VS_EditorObjConst.m_matWorldView);

Output.NormalZ = float4(normalize(normal), f3_ViewPos.z);
Output.Texcoord = UV;

return Output;
}

GBuffer_ps_Output PS_SHProbe_Render(VS_SHPROBE_OUTPUT In) : COLOR
{
half3 norm = (half3)normalize(In.NormalZ.xyz);

half4 sh = GetPrecompLightingAndShadow((half2)In.Texcoord, half3(0,0,1), norm);

GBufferData data;
#ifdef SHOW_LIGHTING_ONLY
data.albedo.rgb = 0.5;
#else
data.albedo.rgb = 1.0;
#endif
data.shadow = sh.a;
data.normal.xyz = norm.xyz; // TODO: view-space
data.depth = In.NormalZ.w;
data.specIntensity = 0;
data.specPower = 0;
data.cubeSpecIntensity = 0;
data.cubeSpecBlur = 0;
data.lightmap = sh.rgb;
data.dynamic = 0;

return GBufferWrite(data);
}

#ifndef _GLSL_
technique tech_SHProbe_Render
{
pass p0
{
VertexShader = compile vs_3_0 VS_SHProbe_Render();
PixelShader = compile ps_3_0 PS_SHProbe_Render();
}
};
#endif

VS_SHPROBE_OUTPUT VS_SHProbe_Picking(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0,
float3 Normal : NORMAL
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_SHPROBE_OUTPUT Output;
float4 Pos1;
float fweight;

uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

Output.NormalZ.xyz = VS_f4_ElemColor.xyz;
Output.NormalZ.w = 0;
Output.Texcoord = UV;

return Output;
}

float4 PS_SHProbe_Picking(VS_SHPROBE_OUTPUT In) : COLOR
{
return float4(In.NormalZ.rgb,0);
}

#ifndef _GLSL_
technique tech_SHProbe_Picking
{
pass p0
{
VertexShader = compile vs_3_0 VS_SHProbe_Picking();
PixelShader = compile ps_3_0 PS_SHProbe_Picking();
}
};
#endif

VS_SHPROBE_OUTPUT VS_SHProbe_PickingZ(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float2 UV : TEXCOORD0,
float3 Normal : NORMAL
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_SHPROBE_OUTPUT Output;
float4 Pos1;
float fweight;

uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);

Output.NormalZ.x = 1.0f / (Output.Position.z);
Output.NormalZ.y = Output.Position.z;
Output.NormalZ.zw = 0;

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);
Output.Texcoord = UV;

return Output;
}

float4 PS_SHProbe_PickingZ(VS_SHPROBE_OUTPUT In) : COLOR
{
float4 f4_Color;
int i1;

f4_Color.a = 1.0 / In.NormalZ.y;
if (f4_Color.a <= 0)
{
f4_Color = 0;
}
else
{
if ( f4_Color.a >= 1.0 )
{
f4_Color.r = 128;
while ( f4_Color.a > 1.0f )
{
f4_Color.r += 1;
f4_Color.a /= 2;
}
}
else
{
f4_Color.r = 129;
while ( f4_Color.a < 1.0f )
{
f4_Color.r -= 1;
f4_Color.a*= 2;
}
f4_Color.a/=2;
}

f4_Color.r /= 255.0f;
i1 = f4_Color.a * 255.0f;
f4_Color.a *= 255.0f;
f4_Color.a -= i1;
f4_Color.g = i1 / 255.0f;
i1 = (int) (f4_Color.a * 255.0f);
f4_Color.a *= 255.0f;
f4_Color.a -= i1;
f4_Color.b = i1 / 255.0f;
f4_Color.a = f4_Color.a;
}
return f4_Color;
}

#ifndef _GLSL_
technique tech_SHProbe_PickingZ
{
pass p0
{
VertexShader = compile vs_3_0 VS_SHProbe_PickingZ();
PixelShader = compile ps_3_0 PS_SHProbe_PickingZ();
}
};
#endif


//****************************************************************
// Cube map Shader
//****************************************************************

struct VS_CUBEMAP_OUTPUT
{
float4 Position : POSITION; // Vertex position
float4 Diffuse : COLOR0_C; // Vertex color
float3 Normal : NORMAL0;
};

VS_CUBEMAP_OUTPUT VS_CubeMap(float4 Pos : POSITION,
float4 Diffuse : COLOR0,
float3 normal : NORMAL
DECL_GEOM_PARAM
DECL_INSTANCING_PARAM
)
{
VS_CUBEMAP_OUTPUT Output;
float4 Pos1;
uncompressPos(Pos);

#if (USE_ANY_GEOM == 1)
OpGeomPos( Pos, GET_GEOM_PARAM,VS_EditorObjConst.f3_ExtraParam.xyz );
#endif

#ifdef USE_INSTANCING
float3 f3_NewPos;
f3_NewPos.x = dot( f4_InstMat0, Pos );
f3_NewPos.y = dot( f4_InstMat1, Pos );
f3_NewPos.z = dot( f4_InstMat2, Pos );
Pos.xyz = f3_NewPos;
#endif

Output.Position = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldViewProj);

// Depth Bias
Pos1 = hlsl_mul(float4(Pos.xyz,1), VS_EditorObjConst.m_matWorldView);
Output.Position.z += VS_EditorObjConst.f4_Bias.x * VS_EditorObjConst.f4_Bias.y * max(VS_EditorObjConst.f4_Bias.z , VS_EditorObjConst.f4_Bias.w * Pos1.z);

Output.Diffuse = 1;
Output.Normal = normal * 2.0f - 1.0f;
return Output;
}

float4 PS_CubeMap(VS_CUBEMAP_OUTPUT In) : COLOR
{
return In.Diffuse * texCUBE( samp_CubeMap, In.Normal );
}

#ifndef _GLSL_
technique tech_CubeMap
{
pass p0
{
VertexShader = compile vs_3_0 VS_CubeMap();
PixelShader = compile ps_3_0 PS_CubeMap();
}
};
#endif

#endif // __cplusplus

#24
Posted 07/19/2016 02:28 PM   
The previous game using this engine The Adventures of TinTin: The Secret of the Unicorn has an option in the game menu to check for 3D Vision. I looked in the NVCP it was rated "excellent", the profiles states "Some objects render at the wrong depth" In the save file location for TinTin it has <Config> <fullscreen>true</fullscreen> <screenwidth>2560</screenwidth> <screenheight>1440</screenheight> <antialias>4</antialias> <vsync>true</vsync> <lang>en</lang> <BigFile>BigFiles\Tintin.bf</BigFile> <usenvidiastereo>true</usenvidiastereo> </Config> TinTin thread https://forums.geforce.com/default/topic/505154/
The previous game using this engine The Adventures of TinTin: The Secret of the Unicorn has an option in the game menu to check for 3D Vision. I looked in the NVCP it was rated "excellent", the profiles states "Some objects render at the wrong depth"

In the save file location for TinTin it has

<Config>
<fullscreen>true</fullscreen>
<screenwidth>2560</screenwidth>
<screenheight>1440</screenheight>
<antialias>4</antialias>
<vsync>true</vsync>
<lang>en</lang>
<BigFile>BigFiles\Tintin.bf</BigFile>
<usenvidiastereo>true</usenvidiastereo>
</Config>

TinTin thread

https://forums.geforce.com/default/topic/505154/

#25
Posted 07/19/2016 05:20 PM   
@DMan-11 I grabbed it for $5 in the Halloween sale, tried poking around in the saves but it looks like they're encrypted/uneditable... bummer :/
@DMan-11
I grabbed it for $5 in the Halloween sale, tried poking around in the saves but it looks like they're encrypted/uneditable... bummer :/
#26
Posted 10/29/2016 05:04 PM   
got it also on sale. I have it already on the WiiU and actually thought it is a quite good game. But the WiiU extra screen destroyed it for me. I don't like looking down when I play a game at the desk. A fix would of course great.
got it also on sale. I have it already on the WiiU and actually thought it is a quite good game. But the WiiU extra screen destroyed it for me. I don't like looking down when I play a game at the desk. A fix would of course great.

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

#27
Posted 10/29/2016 05:24 PM   
Update... I love this game on PC. Controls are so smooth. Would be awesome to play it in 3D. :)
Update... I love this game on PC. Controls are so smooth. Would be awesome to play it in 3D. :)

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

#28
Posted 10/29/2016 08:11 PM   
  2 / 2    
Scroll To Top