If scripting system have function like IsNightEyeActive f.e., then object may change it's state (size, color, etc).i don't understand what you mean by set up an object as Night-Eye, cause Night-Eye is a ISM with HDR parameters, you cannot set up an object with an ISM attached to it, ISM is only for main camera.
I can't touch process memory, only dx data from game, any kind.Can you acces global variables or gamesettings from the game, or do you really need light or color values for DirectX ?
With image space modifiers you can do night-eye detection without my help, but it's not compatible with other weather mods, unless you explain why i'm wrong. Also parameters from weather mixed with night-eye, so if weather set some value to very low (brightness f.e.), then multiplied by night-eye will be small too. I never saw it in fallout, but in skyrim khadjiit vision desaturate colors together with increasing brightness, so it's not that simple one variable.Also, i checked the Night-Eye ISM and it only has brightness upped from 1.000 to 1.300.
If i where to change the values of that ISM to an extreme value, would you be able to detect that ?
Don't bother with it, it's just another api and useless for most programmers.You have any good websites on DirectX to start learning for me ?
I advise to create visualisation test of shader variables to see how they work in different weather and could you make night-eye only for them. This code in enbeffect.fx have all of them listed
Code: Select all
#ifdef APPLYGAMECOLORCORRECTION
//apply original
// float3 BlurScale;
// float4 Cinematic;
// sampler2D DestBlend;
// float4 Fade;
// float4 HDRParam;
// sampler2D Src0;
// float4 Tint;
// Registers:
// Name Reg Size
// ------------ ----- ----
// HDRParam c1 1
// BlurScale c2 1
// Cinematic c19 1
// Tint c20 1
// Fade c22 1
// Src0 s0 1
// DestBlend s1 1
//todo apply uv offsets to coordinates
r0=tex2D(_s0, IN.txcoord0.xy);//r0=tex2D(_s0, IN.txcoord1.xy);
r1=tex2D(_s1, IN.txcoord0.xy);
r0.w=max(r1.w, _c1.x);
r0.w=1.0/r0.w;
r1.w=r0.w * 0.5;
r0.w=r0.w * _c1.x;
r1.xyz=r1 * r1.w;
r2.xyz=max(r1, 0.0);
r0.xyz=r0.w * r0 + r2.xyz;
r0.w=dot(r0.xyz, float3(0.298999995, 0.587000012, 0.114));
r1.xyz=lerp(r0.w, r0, _c19.x);
r0.xyz=_c20 * r0.w - r1;
r0.xyz=_c20.w * r0 + r1;
r0.xyz=_c19.w * r0 - _c19.y;
r0.xyz=_c19.z * r0 + _c19.y;
r1.xyz=lerp(r0, _c22, _c22.w);
r1.w=_c2.z;
_oC0=r1;
#endif //APPLYGAMECOLORCORRECTION
Code: Select all
// HDRParam c1 1
// Cinematic c19 1
// Tint c20 1
// Fade c22 1
Code: Select all
_oC0.w=1.0;
_oC0.xyz=color.xyz;
return _oC0;
If value is too big or too small, then use temporary variable 2 to increase or decrease constant. Of course _c22.w is only one, use any from vectors _c1, _c19, _c20, _c22. If you will find proper combination relatively independent from weather, then night-eye will be just a "if" condition or lerp function with clamped and scaled input.color.xyz=_c22.w*pow(tempF1.y,4);