// icon dot and frame PS cbuffer _Globals : register(b13) { float4x4 offset : packoffset(c0); // shift computed by other shader } SamplerState mySampler_s : register(s0); Texture2D mySampler : register(t0); SamplerState migotoSampler { Filter = D3D11_FILTER_ANISOTROPIC; AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; }; // 3Dmigoto declarations #define cmp - Texture1D IniParams : register(t120); Texture2D cockpitMaskText : register(t121); void main( float4 v0 : SV_Position0, float4 v1 : COLOR0, float2 v2 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; float2 tmp; float4 tmp2; float4 filter; uint width; uint height; float flagTexture = IniParams.Load(int2(1, 0)).y; // Waypt Texture flag float zoomFactor = IniParams.Load(0).w; // zoom factor float FovXshift = IniParams.Load(int2(6, 0)).x; // float flagColor = IniParams.Load(int2(2, 0)).x; float ReplGray = IniParams.Load(int2(4, 0)).x; float flagText = IniParams.Load(int2(3, 0)).x; float rt_width = IniParams.Load(int2(1, 0)).w; float rt_height = IniParams.Load(int2(4, 0)).w; float flagMask = IniParams.Load(int2(7, 0)).w; // Masking float flagWaypt = IniParams.Load(int2(7, 0)).z; // Waypoint display toggle float eye = IniParams.Load(int2(5, 0)).w; // color fix to mul // float cosView = IniParams.Load(int2(8, 0)).z; float flagColor; if (ReplGray == -9999.0) flagColor=1.0; else flagColor = 0.0; r0.xyzw = mySampler.Sample(mySampler_s, v2.xy).xyzw; tmp2.xyzw = v1.xyzw * r0.xyzw; o0.w = tmp2.w; o0.xyz = tmp2.xyz * float3(flagColor,flagColor,flagColor) + float3(ReplGray*(1-flagColor),ReplGray*(1-flagColor),ReplGray*(1-flagColor)); //filtering done by game now ! tmp.x = v0.x/rt_width; tmp.y = v0.y/rt_height; filter = cockpitMaskText.Sample(migotoSampler,tmp.xy).xyzw; // filter chevron if (flagTexture == 0 && v2.x > 0.5 ) o0.w = tmp2.w*flagText; //mask icon by airframe //filtering done by game now ! if (filter.x != 0 && flagMask == 1 ) o0.w = 0.0; // filter waypoint // if (flagTexture == 1 && flagWaypt == 0 ) o0.w = 0; if (filter.x != 0 && flagWaypt == 1 ) o0.w = 0.0; if (ReplGray == 9999.0) o0.xyzw=float4(1.0,1.0,1.0,1.0); //mask label when rotation // if (cosView != 1.0 ) o0.w=0.0; // filter triangle planes indicators in screen border => disabled because of side effects on stars ! // if (v2.y > 0.27 && v2.x < 0.27 && flagWaypt == 1) o0.w=0.0; // if (v2.y > 0.27 && v2.x < 0.27 ) o0.w=0.0; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.57 on Thu Jul 27 13:46:23 2017 // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // mySampler sampler NA NA 0 1 // mySampler texture float4 2d 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float // COLOR 0 xyzw 1 NONE float xyzw // TEXCOORD 0 xy 2 NONE float xy // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_4_0 dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps linear v1.xyzw dcl_input_ps linear v2.xy dcl_output o0.xyzw dcl_temps 1 sample r0.xyzw, v2.xyxx, t0.xyzw, s0 mul o0.xyzw, r0.xyzw, v1.xyzw ret // Approximately 3 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/