Native 3D Vision support in Unity Games via Injector
5 / 8
[quote="sgsrules"]On another note... I'm wondering if a similar method could be used for Unreal Engine games. Full source code for the engine is available. It might be possible to create an injector or wrapper and use the same approach. [/quote]
You mean like this:
https://github.com/DarkStarSword/UnrealEngine/tree/3DVision-4.14.3
You need to sign up (free) to Epic to see that repo
You might like to take a look at some of the code in the plugin, particularly what is under here:
https://github.com/DarkStarSword/UnrealEngine/tree/3DVision-4.14.3/Engine/Plugins/Runtime/NV3DVision/Source/NV3DVision/Private
In particular:
- The plugin fakes being a VR device so that UE4 initialises it automatically
- It uses 3D Vision Direct (this required a very early init to happen before the device was created)
- It uses a 200% wide buffer internally, and blits each side to each back buffer each frame (this is due to how native stereo is implemented in UE4 - my first choice would have been to maintain separate buffers).
- It supports the same separation and convergence controls by the driver
- It has logic to override the default convergence from the driver with something more suited to UE4, but will not override custom convergence values that a player might have saved in the profile
- It uses a 100% equivalent projection to that used by 3D Vision Automatic, but in the matrices instead of the formula (I do use the formula for HUD elements)
- It modifies both projection matrix *AND* the view origin (which will become part of one of the two view matrices) so that reflections render at correct depth
- It duplicates various types of UE4 HUD elements (bug: the mouse does not select the right element yet)
- It supports stereo depth on certain HUD elements (but this is unused by any game I know of)
- It behaves correctly when 3D Vision is disabled via control panel, ctrl+t, when alt+tabbing out, etc.
If any VR drivers are installed (Oculus) or plugged in (SteamVR), the game needs to be started with -hmd=NV3DVision to use exactly this plugin, as both Oculus and SteamVR will interfere with 3D Vision, even if the game does not actually support VR.
The main problem with this plugin, is there is no (AFAIK) way to inject it into an existing game - the developer would have to include this plugin, or I need to push it up to Epic so that all games using future versions of the engine will support it (this is what I was working towards before I was hit with another major depressive episode and had to give up gaming and modding again, so it's currently on hold... but it is 95% complete).
A couple of highlights incase you cbf getting access to the repo:
Initialising 3D Vision Direct:
[code] // Check if 3D Vision is enabled in the control panel:
ret = NvAPI_Stereo_IsEnabled(&stereo_enabled_registry);
if (ret != NVAPI_OK || !stereo_enabled_registry) {
UE_LOG(Log3DVision, Log, TEXT("3D Vision is disabled (check the control panel)"));
return false;
}
// This needs to be done before the D3D device is created. Waiting until
// the HMD is created is too late, so we use LoadingPhase=PostConfigInit
// and do it on module startup to make sure it's early enough.
check(!GIsRHIInitialized);
UE_LOG(Log3DVision, Log, TEXT("Setting 3D Vision Direct stereo mode..."));
ret = NvAPI_Stereo_SetDriverMode(NVAPI_STEREO_DRIVER_MODE_DIRECT);
if (ret != NVAPI_OK) {
UE_LOG(Log3DVision, Log, TEXT("Failed to enable 3D Vision Direct mode"));
return false;
}[/code]
Updating the internal separation and convergence to match the driver, with logic for overriding the inappropriate default from the driver without overriding a custom value (update_convergence and update_separation are set if the game has called an API I provided to change them, so you can probably assume they will always be false in your case):
[code]
void FNV3DVision::UpdateDriverSettings()
{
bool stereo_was_enabled = !!stereo_enabled;
float old_convergence = convergence;
NvAPI_Status ret;
// This crashes if we aren't in the rendering thread:
check(IsInRenderingThread());
if (!stereo_handle)
return;
EnterCriticalSection(&nvapi_lock);
ret = NvAPI_Stereo_IsActivated(stereo_handle, &stereo_enabled);
if (ret != NVAPI_OK || !stereo_enabled)
goto out_unlock;
// The nv driver calibrates eye separation as a ratio of IPD / display
// width. It always uses a conservative IPD of 6.5cm, and in some cases
// may not know the actual size of the display (e.g. when using a 3D
// projector). The driver doesn't provide any way to override these values,
// and as such the communtiy uses depth hacks to increase it when
// necessary. It might be nice to provide a way to override this in UE4 as
// an alternative.
NvAPI_Stereo_GetEyeSeparation(stereo_handle, &eye_sep);
// Separation
if (update_separation) {
NvAPI_Stereo_SetSeparation(stereo_handle, raw_separation);
update_separation = false;
} else {
NvAPI_Stereo_GetSeparation(stereo_handle, &raw_separation);
}
// Convergence
if (update_convergence) {
NvAPI_Stereo_SetConvergence(stereo_handle, convergence);
update_convergence = false;
} else {
NvAPI_Stereo_GetConvergence(stereo_handle, &convergence);
if (!stereo_was_enabled && (has_obtained_driver_settings || convergence == 4.0f)) {
// This handles two scenarios:
//
// 1) First time stereo has been enabled and the convergence is exactly
// 4.0, the default value used for games without a driver profile or
// without a StereoConvergence value saved in their profile. 4.0 is far
// too low for UE4 games, so bump it up to 50.0, which is a more
// reasonable value (but of course the best value depends on the game).
// If the user has saved a profile (or nvidia shipped one with a driver
// update) the convergence is unlikely to be exactly 4.0, so in that
// case just respect whatever it is set to.
//
// 2) Stereo has been enabled, disabled and is now enabled again. This
// might happen if the user soft disabled it with Ctrl+T, which will be
// harmless, but could also happen if the user alt+tabbed out, in which
// case the driver settings might have been reloaded from the profile.
// We don't want that, since it might restore the convergence value
// from the profile (possibly 4.0, or possibly a user saved value)
// instead of what we were using before stereo was disabled, so restore
// our value.
UE_LOG(Log3DVision, Log, TEXT("Overriding driver convergence from %f to %f"),
convergence, old_convergence);
convergence = old_convergence;
NvAPI_Stereo_SetConvergence(stereo_handle, convergence);
}
}
has_obtained_driver_settings = true;
out_unlock:
LeaveCriticalSection(&nvapi_lock);
}
[/code]
Adjust projection matrix & view origin:
[code]
bool FNV3DVision::CalculateStereoProjectionMatrixGivenView(const enum EStereoscopicPass StereoPassType, const FMinimalViewInfo& ViewInfo, TEnumAsByte<enum EAspectRatioAxisConstraint> AspectRatioAxisConstraint, class FViewport* Viewport, struct FSceneViewProjectionData& InOutProjectionData)
{
float eye = (StereoPassType == eSSP_LEFT_EYE) ? -1.0f : 1.0f;
float separation = 0.0f;
// Create the projection matrix (and possibly constrain the view rectangle)
FMinimalViewInfo::CalculateProjectionMatrixGivenView(ViewInfo, AspectRatioAxisConstraint, Viewport, InOutProjectionData);
if (!InOutProjectionData.IsPerspectiveProjection())
return true;
if (!stereo_enabled)
return true;
// In 3D Vision Automatic, "separation" as passed to the game is
// pre-computed as follows. Do the same here for consistency:
separation = eye * eye_sep * raw_separation / 100.0f;
// Inject a stereo correction into the projection matrix. We use the same
// separation and convergence values as 3D Vision Automatic, and the result
// of using this projection matrix will be equivelent to the nVidia
// formula. This allows players to adjust the stereo projection using the
// controls they are already familiar with. It also means that if anyone
// from the Helix community needs to fix a game (e.g. using 3DMigoto) the
// parameters will match:
InOutProjectionData.ProjectionMatrix.M[2][0] = separation;
// InOutProjectionData.ProjectionMatrix.M[3][0] = -separation * convergence;
// Ok, we don't quite do what the nvidia formula would have done. Instead
// of placing -separation*convergence in the projection matrix, we will
// adjust the ViewOrigin by a mathematically equivelent amount in
// world-space (think - a world space stereo correction at depth == 0). The
// positions of all the objects will be identical, but this allows
// reflections to work accurately:
FVector view_offset(separation * convergence / InOutProjectionData.ProjectionMatrix.M[0][0], 0.0f, 0.0f);
FVector world_offset = InOutProjectionData.ViewRotationMatrix.InverseTransformVector(view_offset);
InOutProjectionData.ViewOrigin += world_offset;
return true;
}
[/code]
Queuing rendering commands to set the active back buffer (NvAPI_Stereo_SetActiveEye) then blit each side of the 200% width buffer to the appropriate stereo back buffer:
[code]
// Do the right eye first, since 3D Vision also treats that as the mono
// buffer for when stereo is disabled
new (RHICmdList.AllocCommand<FNV3DVisionSetActiveEye>()) FNV3DVisionSetActiveEye(stereo_handle, NVAPI_STEREO_EYE_RIGHT);
RendererModule->DrawRectangle(
RHICmdList,
0, 0,
ViewportWidth, ViewportHeight,
0.5f, 0.0f,
0.5f, 1.0f,
FIntPoint(ViewportWidth, ViewportHeight),
FIntPoint(1, 1),
*VertexShader,
EDRF_Default);
if (!stereo_enabled)
return;
new (RHICmdList.AllocCommand<FNV3DVisionSetActiveEye>()) FNV3DVisionSetActiveEye(stereo_handle, NVAPI_STEREO_EYE_LEFT);
RendererModule->DrawRectangle(
RHICmdList,
0, 0,
ViewportWidth, ViewportHeight,
0.0f, 0.0f,
0.5f, 1.0f,
FIntPoint(ViewportWidth, ViewportHeight),
FIntPoint(1, 1),
*VertexShader,
EDRF_Default);
[/code]
Adjusting a HUD element to a given world depth (this is not really used in UE4... I'm not sure if it ever was used... it's not even supported by the new style HUDs):
[code]
// Apply nvidia formula to adjust HUD depth. Note that this includes
// the perspective divide that is usually not specified in the formula
// because it is expected to happen implicitly, but that is not the
// case here since the HUD is not rendered with a depth value. Also
// performing a divide by 2 here since the formula is in clip space
// [-1:+1] while this is in pixels [0:RTWidth].
//
// FUTURE: An alternative way to specify the HUD depth that we often use
// in the community is using a scale of 0 = screen depth, 1.0 =
// infinity, negative = pop out. That way it is not affected by
// convergence, which is sometimes desirable - particularly if you want
// the HUD to be at/near screen depth.
//
// XXX: UE4 defaults to a HUD depth of 150 for canvas items, which
// might be too deep for some circumstances - not everyone can focus on
// a HUD that is rendered behind a 3D object. Might be nice to provide
// a means to override the default.
float separation = eye_sep * raw_separation / 100.0f;
offset = separation * (OrthoDistance - convergence) / OrthoDistance * 0.5f;
[/code]
The nvapi lock may not be necessary - from the crashes I've seen I think it has more to do with which thread calls the nvapi functions than locking (render thread calls into nvapi don't crash, anything else might), but since we found it necessary to add locks around the nvapi calls in 3DMigoto I erred on the side of caution and added them in this plugin just in case.
sgsrules said:On another note... I'm wondering if a similar method could be used for Unreal Engine games. Full source code for the engine is available. It might be possible to create an injector or wrapper and use the same approach.
In particular:
- The plugin fakes being a VR device so that UE4 initialises it automatically
- It uses 3D Vision Direct (this required a very early init to happen before the device was created)
- It uses a 200% wide buffer internally, and blits each side to each back buffer each frame (this is due to how native stereo is implemented in UE4 - my first choice would have been to maintain separate buffers).
- It supports the same separation and convergence controls by the driver
- It has logic to override the default convergence from the driver with something more suited to UE4, but will not override custom convergence values that a player might have saved in the profile
- It uses a 100% equivalent projection to that used by 3D Vision Automatic, but in the matrices instead of the formula (I do use the formula for HUD elements)
- It modifies both projection matrix *AND* the view origin (which will become part of one of the two view matrices) so that reflections render at correct depth
- It duplicates various types of UE4 HUD elements (bug: the mouse does not select the right element yet)
- It supports stereo depth on certain HUD elements (but this is unused by any game I know of)
- It behaves correctly when 3D Vision is disabled via control panel, ctrl+t, when alt+tabbing out, etc.
If any VR drivers are installed (Oculus) or plugged in (SteamVR), the game needs to be started with -hmd=NV3DVision to use exactly this plugin, as both Oculus and SteamVR will interfere with 3D Vision, even if the game does not actually support VR.
The main problem with this plugin, is there is no (AFAIK) way to inject it into an existing game - the developer would have to include this plugin, or I need to push it up to Epic so that all games using future versions of the engine will support it (this is what I was working towards before I was hit with another major depressive episode and had to give up gaming and modding again, so it's currently on hold... but it is 95% complete).
A couple of highlights incase you cbf getting access to the repo:
Initialising 3D Vision Direct:
// Check if 3D Vision is enabled in the control panel:
ret = NvAPI_Stereo_IsEnabled(&stereo_enabled_registry);
if (ret != NVAPI_OK || !stereo_enabled_registry) {
UE_LOG(Log3DVision, Log, TEXT("3D Vision is disabled (check the control panel)"));
return false;
}
// This needs to be done before the D3D device is created. Waiting until
// the HMD is created is too late, so we use LoadingPhase=PostConfigInit
// and do it on module startup to make sure it's early enough.
check(!GIsRHIInitialized);
UE_LOG(Log3DVision, Log, TEXT("Setting 3D Vision Direct stereo mode..."));
ret = NvAPI_Stereo_SetDriverMode(NVAPI_STEREO_DRIVER_MODE_DIRECT);
if (ret != NVAPI_OK) {
UE_LOG(Log3DVision, Log, TEXT("Failed to enable 3D Vision Direct mode"));
return false;
}
Updating the internal separation and convergence to match the driver, with logic for overriding the inappropriate default from the driver without overriding a custom value (update_convergence and update_separation are set if the game has called an API I provided to change them, so you can probably assume they will always be false in your case):
// This crashes if we aren't in the rendering thread:
check(IsInRenderingThread());
if (!stereo_handle)
return;
EnterCriticalSection(&nvapi_lock);
ret = NvAPI_Stereo_IsActivated(stereo_handle, &stereo_enabled);
if (ret != NVAPI_OK || !stereo_enabled)
goto out_unlock;
// The nv driver calibrates eye separation as a ratio of IPD / display
// width. It always uses a conservative IPD of 6.5cm, and in some cases
// may not know the actual size of the display (e.g. when using a 3D
// projector). The driver doesn't provide any way to override these values,
// and as such the communtiy uses depth hacks to increase it when
// necessary. It might be nice to provide a way to override this in UE4 as
// an alternative.
NvAPI_Stereo_GetEyeSeparation(stereo_handle, &eye_sep);
if (!stereo_was_enabled && (has_obtained_driver_settings || convergence == 4.0f)) {
// This handles two scenarios:
//
// 1) First time stereo has been enabled and the convergence is exactly
// 4.0, the default value used for games without a driver profile or
// without a StereoConvergence value saved in their profile. 4.0 is far
// too low for UE4 games, so bump it up to 50.0, which is a more
// reasonable value (but of course the best value depends on the game).
// If the user has saved a profile (or nvidia shipped one with a driver
// update) the convergence is unlikely to be exactly 4.0, so in that
// case just respect whatever it is set to.
//
// 2) Stereo has been enabled, disabled and is now enabled again. This
// might happen if the user soft disabled it with Ctrl+T, which will be
// harmless, but could also happen if the user alt+tabbed out, in which
// case the driver settings might have been reloaded from the profile.
// We don't want that, since it might restore the convergence value
// from the profile (possibly 4.0, or possibly a user saved value)
// instead of what we were using before stereo was disabled, so restore
// our value.
UE_LOG(Log3DVision, Log, TEXT("Overriding driver convergence from %f to %f"),
convergence, old_convergence);
// Create the projection matrix (and possibly constrain the view rectangle)
FMinimalViewInfo::CalculateProjectionMatrixGivenView(ViewInfo, AspectRatioAxisConstraint, Viewport, InOutProjectionData);
if (!InOutProjectionData.IsPerspectiveProjection())
return true;
if (!stereo_enabled)
return true;
// In 3D Vision Automatic, "separation" as passed to the game is
// pre-computed as follows. Do the same here for consistency:
separation = eye * eye_sep * raw_separation / 100.0f;
// Inject a stereo correction into the projection matrix. We use the same
// separation and convergence values as 3D Vision Automatic, and the result
// of using this projection matrix will be equivelent to the nVidia
// formula. This allows players to adjust the stereo projection using the
// controls they are already familiar with. It also means that if anyone
// from the Helix community needs to fix a game (e.g. using 3DMigoto) the
// parameters will match:
InOutProjectionData.ProjectionMatrix.M[2][0] = separation;
// InOutProjectionData.ProjectionMatrix.M[3][0] = -separation * convergence;
// Ok, we don't quite do what the nvidia formula would have done. Instead
// of placing -separation*convergence in the projection matrix, we will
// adjust the ViewOrigin by a mathematically equivelent amount in
// world-space (think - a world space stereo correction at depth == 0). The
// positions of all the objects will be identical, but this allows
// reflections to work accurately:
FVector view_offset(separation * convergence / InOutProjectionData.ProjectionMatrix.M[0][0], 0.0f, 0.0f);
FVector world_offset = InOutProjectionData.ViewRotationMatrix.InverseTransformVector(view_offset);
InOutProjectionData.ViewOrigin += world_offset;
return true;
}
Queuing rendering commands to set the active back buffer (NvAPI_Stereo_SetActiveEye) then blit each side of the 200% width buffer to the appropriate stereo back buffer:
// Do the right eye first, since 3D Vision also treats that as the mono
// buffer for when stereo is disabled
new (RHICmdList.AllocCommand<FNV3DVisionSetActiveEye>()) FNV3DVisionSetActiveEye(stereo_handle, NVAPI_STEREO_EYE_RIGHT);
RendererModule->DrawRectangle(
RHICmdList,
0, 0,
ViewportWidth, ViewportHeight,
0.5f, 0.0f,
0.5f, 1.0f,
FIntPoint(ViewportWidth, ViewportHeight),
FIntPoint(1, 1),
*VertexShader,
EDRF_Default);
Adjusting a HUD element to a given world depth (this is not really used in UE4... I'm not sure if it ever was used... it's not even supported by the new style HUDs):
// Apply nvidia formula to adjust HUD depth. Note that this includes
// the perspective divide that is usually not specified in the formula
// because it is expected to happen implicitly, but that is not the
// case here since the HUD is not rendered with a depth value. Also
// performing a divide by 2 here since the formula is in clip space
// [-1:+1] while this is in pixels [0:RTWidth].
//
// FUTURE: An alternative way to specify the HUD depth that we often use
// in the community is using a scale of 0 = screen depth, 1.0 =
// infinity, negative = pop out. That way it is not affected by
// convergence, which is sometimes desirable - particularly if you want
// the HUD to be at/near screen depth.
//
// XXX: UE4 defaults to a HUD depth of 150 for canvas items, which
// might be too deep for some circumstances - not everyone can focus on
// a HUD that is rendered behind a 3D object. Might be nice to provide
// a means to override the default.
float separation = eye_sep * raw_separation / 100.0f;
offset = separation * (OrthoDistance - convergence) / OrthoDistance * 0.5f;
The nvapi lock may not be necessary - from the crashes I've seen I think it has more to do with which thread calls the nvapi functions than locking (render thread calls into nvapi don't crash, anything else might), but since we found it necessary to add locks around the nvapi calls in 3DMigoto I erred on the side of caution and added them in this plugin just in case.
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
[quote="DarkStarSword"]
The main problem with this plugin, is there is no (AFAIK) way to inject it into an existing game - the developer would have to include this plugin, or I need to push it up to Epic so that all games using future versions of the engine will support it (this is what I was working towards before I was hit with another major depressive episode and had to give up gaming and modding again, so it's currently on hold... but it is 95% complete).
[/quote]
It's fairly easy to inject a dll into Unity since it runs on mono. But, I have no idea if this is possible with UE4, maybe a commonly used library like steamworks could be hooked into? As you said it would be ideal if epic could just add support, you've already done most of the work so i don't see why they would be against it.
[quote="DarkStarSword"]
Adjust projection matrix & view origin:
[code]
bool FNV3DVision::CalculateStereoProjectionMatrixGivenView(const enum EStereoscopicPass StereoPassType, const FMinimalViewInfo& ViewInfo, TEnumAsByte<enum EAspectRatioAxisConstraint> AspectRatioAxisConstraint, class FViewport* Viewport, struct FSceneViewProjectionData& InOutProjectionData)
{
float eye = (StereoPassType == eSSP_LEFT_EYE) ? -1.0f : 1.0f;
float separation = 0.0f;
// Create the projection matrix (and possibly constrain the view rectangle)
FMinimalViewInfo::CalculateProjectionMatrixGivenView(ViewInfo, AspectRatioAxisConstraint, Viewport, InOutProjectionData);
if (!InOutProjectionData.IsPerspectiveProjection())
return true;
if (!stereo_enabled)
return true;
// In 3D Vision Automatic, "separation" as passed to the game is
// pre-computed as follows. Do the same here for consistency:
separation = eye * eye_sep * raw_separation / 100.0f;
// Inject a stereo correction into the projection matrix. We use the same
// separation and convergence values as 3D Vision Automatic, and the result
// of using this projection matrix will be equivelent to the nVidia
// formula. This allows players to adjust the stereo projection using the
// controls they are already familiar with. It also means that if anyone
// from the Helix community needs to fix a game (e.g. using 3DMigoto) the
// parameters will match:
InOutProjectionData.ProjectionMatrix.M[2][0] = separation;
// InOutProjectionData.ProjectionMatrix.M[3][0] = -separation * convergence;
// Ok, we don't quite do what the nvidia formula would have done. Instead
// of placing -separation*convergence in the projection matrix, we will
// adjust the ViewOrigin by a mathematically equivelent amount in
// world-space (think - a world space stereo correction at depth == 0). The
// positions of all the objects will be identical, but this allows
// reflections to work accurately:
FVector view_offset(separation * convergence / InOutProjectionData.ProjectionMatrix.M[0][0], 0.0f, 0.0f);
FVector world_offset = InOutProjectionData.ViewRotationMatrix.InverseTransformVector(view_offset);
InOutProjectionData.ViewOrigin += world_offset;
return true;
}
[/code][/quote]
I thought about transforming the convergence * separation (ProjectionMatrix.M[3][0]) values to world space by multiplying it by the inverse projection matrix but never tried it out, good to know it works. I was doing all my stereo offsets in world space which worked fine, but i had to fudge the nvapi separation/convergence values which was less than ideal because values for one game wouldn't necessarily work for another game.
Brilliant work as usual DSS! Thanks for sharing this! I wish you the best of luck and hope things turn around for you.
DarkStarSword said:
The main problem with this plugin, is there is no (AFAIK) way to inject it into an existing game - the developer would have to include this plugin, or I need to push it up to Epic so that all games using future versions of the engine will support it (this is what I was working towards before I was hit with another major depressive episode and had to give up gaming and modding again, so it's currently on hold... but it is 95% complete).
It's fairly easy to inject a dll into Unity since it runs on mono. But, I have no idea if this is possible with UE4, maybe a commonly used library like steamworks could be hooked into? As you said it would be ideal if epic could just add support, you've already done most of the work so i don't see why they would be against it.
// Create the projection matrix (and possibly constrain the view rectangle)
FMinimalViewInfo::CalculateProjectionMatrixGivenView(ViewInfo, AspectRatioAxisConstraint, Viewport, InOutProjectionData);
if (!InOutProjectionData.IsPerspectiveProjection())
return true;
if (!stereo_enabled)
return true;
// In 3D Vision Automatic, "separation" as passed to the game is
// pre-computed as follows. Do the same here for consistency:
separation = eye * eye_sep * raw_separation / 100.0f;
// Inject a stereo correction into the projection matrix. We use the same
// separation and convergence values as 3D Vision Automatic, and the result
// of using this projection matrix will be equivelent to the nVidia
// formula. This allows players to adjust the stereo projection using the
// controls they are already familiar with. It also means that if anyone
// from the Helix community needs to fix a game (e.g. using 3DMigoto) the
// parameters will match:
InOutProjectionData.ProjectionMatrix.M[2][0] = separation;
// InOutProjectionData.ProjectionMatrix.M[3][0] = -separation * convergence;
// Ok, we don't quite do what the nvidia formula would have done. Instead
// of placing -separation*convergence in the projection matrix, we will
// adjust the ViewOrigin by a mathematically equivelent amount in
// world-space (think - a world space stereo correction at depth == 0). The
// positions of all the objects will be identical, but this allows
// reflections to work accurately:
FVector view_offset(separation * convergence / InOutProjectionData.ProjectionMatrix.M[0][0], 0.0f, 0.0f);
FVector world_offset = InOutProjectionData.ViewRotationMatrix.InverseTransformVector(view_offset);
InOutProjectionData.ViewOrigin += world_offset;
return true;
}
I thought about transforming the convergence * separation (ProjectionMatrix.M[3][0]) values to world space by multiplying it by the inverse projection matrix but never tried it out, good to know it works. I was doing all my stereo offsets in world space which worked fine, but i had to fudge the nvapi separation/convergence values which was less than ideal because values for one game wouldn't necessarily work for another game.
Brilliant work as usual DSS! Thanks for sharing this! I wish you the best of luck and hope things turn around for you.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
I've run into a few issues getting Direct mode to work in Unity.
3dVision kicks in. In my plugin I'm able to get a d3d11device handle from unity and then call Stereo_CreateHandleFromIUnknown to get a stereo handle and i receive a NVAPI_OK status. I then call Stereo_SetActiveEye before rendering each frame and it returns a NVAPI_OK status for a few frames but then eventually crashes. I looked through the logs and noticed:
*** returns E_NOINTERFACE as error for ID3D11DeviceContext1 (try allow_platform_update=1 if the game refuses to run).
i tried allow_platform_update=1 but then it refuses to run in fullscreen, still crashes and says failed QueryInterface for ID3D11Device1 error in the log.
I think Unity is also not launching with the correct resolution. Unity's log says 1280x720 instead of 2560x720. The d3d11_log also says Width = 1024 Height = 720 and then forces width to 2048 so I'm not sure what it's actually running at. Before it crashes it renders half of the scene and then stretches this across the whole screen.
here are the logs:
d3d11_log.txt
D3D11 DLL starting init - v 1.2.57 - Wed May 24 13:17:52 2017
----------- End driver profile settings -----------
No profile update required
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
NvAPI_Stereo_SetDriverMode successfully set to Direct Mode
*** D3D11 DLL successfully initialized. ***
Trying to load original_d3d11.dll
Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll.
Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory
calling original CreateDXGIFactory1 API
CreateDXGIFactory1 returned factory = 0000000006D00BF0, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@0000000006848550) wrapped 0000000006D00BF0
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@0000000006848550) adapter 0 requested
created HackerDXGIAdapter wrapper = 00000000068484F0 of 00000000052CBBD0
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@00000000068484F0) called
returns adapter: NVIDIA GeForce GTX 980 Ti, sysmem=0, vidmem=6342508544
HackerUnknown::AddRef(class HackerDXGIAdapter@00000000068484F0), counter=2, this=00000000068484F0
returns E_NOINTERFACE as error for ID3D11Device1 (try allow_platform_update=1 if the game refuses to run).
*** returns E_NOINTERFACE as error for ID3D11DeviceContext1 (try allow_platform_update=1 if the game refuses to run).
failed result = 80004002 for 0000000140909B30
failed result = 80004002 for 0000000140909B50
HackerDXGIFactory::QueryInterface(class HackerDXGIFactory1@0000000006848550) called with IID: IDXGIFactory2
*** returns E_NOINTERFACE as error for IDXGIFactory2.
failed result = 80004002 for 0000000140909B38
HackerDXGIDevice::GetAdapter(class HackerDXGIDevice1@00000000052C94B0) called with: 000000000023EF38
created HackerDXGIAdapter wrapper = 0000000006846750 of 00000000052CBBD0
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@0000000006846750) called
returns adapter: NVIDIA GeForce GTX 980 Ti, sysmem=0, vidmem=6342508544
HackerUnknown::Release(class HackerDXGIAdapter@0000000006846750), counter=4, this=0000000006846750
HackerUnknown::Release(class HackerDXGIDevice1@00000000052C94B0), counter=8, this=00000000052C94B0
HackerDevice::GetFeatureLevel(class HackerDevice@00000000063A8ED0) returns FeatureLevel:b000
Hooked_CreateDXGIFactory called with riid: IDXGIFactory
calling original CreateDXGIFactory API
CreateDXGIFactory1 returned factory = 000000000643DB30, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@00000000068466C0) wrapped 000000000643DB30
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@00000000068466C0) adapter 0 requested
created HackerDXGIAdapter wrapper = 0000000006846690 of 00000000068FDF10
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@0000000006846690) called
returns adapter: NVIDIA GeForce GTX 980 Ti, sysmem=0, vidmem=6342508544
HackerUnknown::Release(class HackerDXGIAdapter@0000000006846690), counter=0, this=0000000006846690
counter=0, this=0000000006846690, deleting self.
HackerUnknown::Release(class HackerDXGIFactory1@00000000068466C0), counter=0, this=00000000068466C0
counter=0, this=00000000068466C0, deleting self.
HackerDevice::CreateTexture3D called with parameters
InitialData = 0000000000000000, hash = 7a832640
returns result = 0
HackerDevice::CreateTexture3D called with parameters
InitialData = 0000000000000000, hash = 28c1759b
returns result = 0
HackerDevice::CreateVertexShader called with BytecodeLength = 532, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 55da5eab238de808
returns result = 0, handle = 000000000047D0D8
HackerDevice::CreatePixelShader called with BytecodeLength = 212, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8a092752af82b346
returns result = 0, handle = 000000000047D1D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1112, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 4c9936f7f1d28f6e
returns result = 0, handle = 000000000047DB58
HackerDevice::CreatePixelShader called with BytecodeLength = 3192, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2022ff061146c7c0
returns result = 0, handle = 000000000047DC98
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3b534af100f625da
returns result = 0, handle = 000000000047DDD8
HackerDevice::CreatePixelShader called with BytecodeLength = 344, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 19989ca756844f98
returns result = 0, handle = 000000000047DF18
HackerDevice::CreateVertexShader called with BytecodeLength = 1112, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 4c9936f7f1d28f6e
returns result = 0, handle = 000000000047E018
HackerDevice::CreatePixelShader called with BytecodeLength = 2912, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 021f8e81dfc349dc
returns result = 0, handle = 000000000047E158
HackerDevice::CreateVertexShader called with BytecodeLength = 744, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = b0877e07ea9f2078
returns result = 0, handle = 000000000047E298
HackerDevice::CreatePixelShader called with BytecodeLength = 344, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 53a60d32a7f3e21e
returns result = 0, handle = 000000000047E3D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1252, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2917d6a2498642c6
returns result = 0, handle = 000000000047E4D8
HackerDevice::CreatePixelShader called with BytecodeLength = 2128, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 561f3d9ba6c571d0
returns result = 0, handle = 000000000047E618
HackerDevice::CreateVertexShader called with BytecodeLength = 1252, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2917d6a2498642c6
returns result = 0, handle = 000000000047E758
HackerDevice::CreatePixelShader called with BytecodeLength = 2008, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8622d44371a7c3f1
returns result = 0, handle = 000000000047E898
HackerDevice::CreateVertexShader called with BytecodeLength = 1252, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2917d6a2498642c6
returns result = 0, handle = 0000000006878D98
HackerDevice::CreatePixelShader called with BytecodeLength = 4056, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 6e897a1a2f4fd103
returns result = 0, handle = 0000000006878E98
HackerDevice::CreateVertexShader called with BytecodeLength = 1252, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2917d6a2498642c6
returns result = 0, handle = 0000000006878FD8
HackerDevice::CreatePixelShader called with BytecodeLength = 3936, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 055f4e043db527d4
returns result = 0, handle = 0000000006879118
HackerDevice::CreateVertexShader called with BytecodeLength = 1112, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 4c9936f7f1d28f6e
returns result = 0, handle = 0000000006879258
HackerDevice::CreatePixelShader called with BytecodeLength = 2084, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7653eb72739fefcd
returns result = 0, handle = 0000000006879358
HackerDevice::CreateVertexShader called with BytecodeLength = 1112, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 4c9936f7f1d28f6e
returns result = 0, handle = 0000000006879498
HackerDevice::CreatePixelShader called with BytecodeLength = 2060, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 199a540df8df8cf9
returns result = 0, handle = 00000000068795D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1544, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 355bd424bff4b560
returns result = 0, handle = 0000000006879718
HackerDevice::CreatePixelShader called with BytecodeLength = 472, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 60fe34f3b8743388
returns result = 0, handle = 0000000006879818
HackerDevice::CreateVertexShader called with BytecodeLength = 1652, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e6dc069e7181d96e
returns result = 0, handle = 0000000006879958
HackerDevice::CreatePixelShader called with BytecodeLength = 676, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e8780e7ffb7de98c
returns result = 0, handle = 0000000006879A98
HackerDevice::CreateVertexShader called with BytecodeLength = 2884, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d3f1ba75bedb8d96
returns result = 0, handle = 0000000006879BD8
HackerDevice::CreatePixelShader called with BytecodeLength = 496, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a54f34dd58d03f32
returns result = 0, handle = 0000000006879CD8
HackerDevice::CreateVertexShader called with BytecodeLength = 3188, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 181929edf7e61ab3
returns result = 0, handle = 0000000006879E18
HackerDevice::CreatePixelShader called with BytecodeLength = 664, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 206d094787c06b0f
returns result = 0, handle = 0000000006879F58
HackerDevice::CreateVertexShader called with BytecodeLength = 1972, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d60c20b9f339ca0c
returns result = 0, handle = 000000000687A098
HackerDevice::CreatePixelShader called with BytecodeLength = 472, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 60fe34f3b8743388
returns result = 0, handle = 000000000687A198
HackerDevice::CreateVertexShader called with BytecodeLength = 2072, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = c75c6774b9f48b6d
returns result = 0, handle = 000000000687A2D8
HackerDevice::CreatePixelShader called with BytecodeLength = 664, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = dd97fcf4ac8181e8
returns result = 0, handle = 000000000687A418
HackerDevice::CreateVertexShader called with BytecodeLength = 2096, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 048e4e3f832efad2
returns result = 0, handle = 000000000687A558
HackerDevice::CreatePixelShader called with BytecodeLength = 664, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = dd97fcf4ac8181e8
returns result = 0, handle = 000000000687A658
HackerDevice::CreateVertexShader called with BytecodeLength = 1484, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ca22dd01108d528b
returns result = 0, handle = 000000000687A798
HackerDevice::CreatePixelShader called with BytecodeLength = 640, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e454bf87739d7de5
returns result = 0, handle = 000000000687A8D8
HackerDevice::CreateVertexShader called with BytecodeLength = 3112, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ddc2739eb3949842
returns result = 0, handle = 000000000687AA18
HackerDevice::CreatePixelShader called with BytecodeLength = 712, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ed5ef82f90d21ada
returns result = 0, handle = 000000000687AB18
HackerDevice::CreateVertexShader called with BytecodeLength = 2956, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = c791d5cc8bc9471d
returns result = 0, handle = 00000000062ECCD8
HackerDevice::CreatePixelShader called with BytecodeLength = 712, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ed5ef82f90d21ada
returns result = 0, handle = 00000000062ECE18
HackerDevice::CreateVertexShader called with BytecodeLength = 1312, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d57ca488783a4cca
returns result = 0, handle = 00000000062ECF18
HackerDevice::CreatePixelShader called with BytecodeLength = 704, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2358bf99e643714c
returns result = 0, handle = 00000000062ED058
HackerDevice::CreateVertexShader called with BytecodeLength = 840, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 99fb654c8d14d422
returns result = 0, handle = 00000000062ED198
HackerDevice::CreatePixelShader called with BytecodeLength = 1340, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3315a135238852b3
returns result = 0, handle = 00000000062ED2D8
HackerDevice::CreateVertexShader called with BytecodeLength = 840, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 99fb654c8d14d422
returns result = 0, handle = 00000000062ED3D8
HackerDevice::CreatePixelShader called with BytecodeLength = 1396, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a26e09b7ac1ce891
returns result = 0, handle = 00000000062ED518
HackerDevice::CreateVertexShader called with BytecodeLength = 784, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d9c39305ed8c0b2a
returns result = 0, handle = 00000000062ED658
HackerDevice::CreatePixelShader called with BytecodeLength = 388, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8cbe89127cc5907e
returns result = 0, handle = 00000000062ED798
HackerDevice::CreateVertexShader called with BytecodeLength = 784, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d9c39305ed8c0b2a
returns result = 0, handle = 00000000062ED898
HackerDevice::CreatePixelShader called with BytecodeLength = 368, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 0503f9d284e9d42a
returns result = 0, handle = 00000000062ED9D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1880, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 182d5ce5e4d27df7
returns result = 0, handle = 00000000062EDB18
HackerDevice::CreatePixelShader called with BytecodeLength = 1280, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 6bd925aacce97e65
returns result = 0, handle = 00000000062EDC58
HackerDevice::CreateVertexShader called with BytecodeLength = 1212, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = eca87ada1b6f621f
returns result = 0, handle = 00000000062EDD58
HackerDevice::CreatePixelShader called with BytecodeLength = 1580, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 89fb1985250f47fd
returns result = 0, handle = 00000000062EDE98
HackerDevice::CreateVertexShader called with BytecodeLength = 1036, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 886009a542036c71
returns result = 0, handle = 00000000062EDFD8
HackerDevice::CreatePixelShader called with BytecodeLength = 332, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = c772ec06f24df2fb
returns result = 0, handle = 00000000062EE118
HackerDevice::CreateVertexShader called with BytecodeLength = 2016, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 90eee6fe78775190
returns result = 0, handle = 00000000062EE218
HackerDevice::CreatePixelShader called with BytecodeLength = 660, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3a66757824d5105b
returns result = 0, handle = 00000000062EE358
HackerDevice::CreateVertexShader called with BytecodeLength = 1880, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e7f0c8630930a677
returns result = 0, handle = 00000000062EE498
HackerDevice::CreatePixelShader called with BytecodeLength = 800, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 0b001ffc13cfda12
returns result = 0, handle = 00000000062EE5D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1372, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 446ae20993c131f9
returns result = 0, handle = 00000000062EE6D8
HackerDevice::CreatePixelShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e6530d7c80392e88
returns result = 0, handle = 00000000062EE818
HackerDevice::CreateVertexShader called with BytecodeLength = 3288, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7ec8d99950e63bdf
returns result = 0, handle = 00000000062EE958
HackerDevice::CreatePixelShader called with BytecodeLength = 472, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 72b7a33e58a3c5da
returns result = 0, handle = 00000000062EEA98
HackerDevice::CreateVertexShader called with BytecodeLength = 888, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = abf6253add0a62d2
returns result = 0, handle = 0000000006B70298
HackerDevice::CreatePixelShader called with BytecodeLength = 552, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ff90d3e84724510a
returns result = 0, handle = 0000000006B703D8
HackerDevice::CreateVertexShader called with BytecodeLength = 968, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = c10039042b990b09
returns result = 0, handle = 0000000006B704D8
HackerDevice::CreatePixelShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 43188e7b540d35fb
returns result = 0, handle = 0000000006B70618
HackerDevice::CreateVertexShader called with BytecodeLength = 1408, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d52fd4f68151675b
returns result = 0, handle = 0000000006B70758
HackerDevice::CreatePixelShader called with BytecodeLength = 212, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 0c69f0c42d4ac0be
returns result = 0, handle = 0000000006B70898
HackerDevice::CreateVertexShader called with BytecodeLength = 676, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 41c6e8dde129ef2c
returns result = 0, handle = 0000000006B70998
HackerDevice::CreatePixelShader called with BytecodeLength = 13220, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3d62dc0837d582e3
returns result = 0, handle = 0000000006B70AD8
HackerDevice::CreateVertexShader called with BytecodeLength = 676, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 41c6e8dde129ef2c
returns result = 0, handle = 0000000006B70C18
HackerDevice::CreatePixelShader called with BytecodeLength = 320, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 80df1b3b826b6a7f
returns result = 0, handle = 0000000006B70D58
HackerDevice::CreateVertexShader called with BytecodeLength = 676, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 41c6e8dde129ef2c
returns result = 0, handle = 0000000006B70E58
HackerDevice::CreatePixelShader called with BytecodeLength = 320, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e7ec0322be395449
returns result = 0, handle = 0000000006B70F98
HackerDevice::CreateVertexShader called with BytecodeLength = 676, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 41c6e8dde129ef2c
returns result = 0, handle = 0000000006B710D8
HackerDevice::CreatePixelShader called with BytecodeLength = 320, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = e7ec0322be395449
returns result = 0, handle = 0000000006B71218
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7c19a2fc51c1bc20
returns result = 0, handle = 0000000006B71318
HackerDevice::CreatePixelShader called with BytecodeLength = 732, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 6b5fa542eec46f78
returns result = 0, handle = 0000000006B71458
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7c19a2fc51c1bc20
returns result = 0, handle = 0000000006B71598
HackerDevice::CreatePixelShader called with BytecodeLength = 732, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 6b5fa542eec46f78
returns result = 0, handle = 0000000006B716D8
HackerDevice::CreateVertexShader called with BytecodeLength = 828, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = c387145bd2cf25f7
returns result = 0, handle = 0000000006B717D8
HackerDevice::CreatePixelShader called with BytecodeLength = 660, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8e20e7038ebc5eae
returns result = 0, handle = 0000000006B71918
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3b534af100f625da
returns result = 0, handle = 0000000006B71A58
HackerDevice::CreatePixelShader called with BytecodeLength = 736, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d1449763598e83d6
returns result = 0, handle = 0000000006B71B98
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3b534af100f625da
returns result = 0, handle = 0000000006B71C98
HackerDevice::CreatePixelShader called with BytecodeLength = 872, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3ed8f017555aba66
returns result = 0, handle = 0000000006B71DD8
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3b534af100f625da
returns result = 0, handle = 0000000006B71F18
HackerDevice::CreatePixelShader called with BytecodeLength = 908, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3fe6ddf3fbca87ac
returns result = 0, handle = 0000000006B72058
HackerDevice::CreateVertexShader called with BytecodeLength = 644, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 3b534af100f625da
returns result = 0, handle = 0000000006F33BD8
HackerDevice::CreatePixelShader called with BytecodeLength = 368, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7bcc9bdf3689f07a
returns result = 0, handle = 0000000006F33CD8
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 77d36be54a7e971e
returns result = 0, handle = 0000000006F33E18
HackerDevice::CreatePixelShader called with BytecodeLength = 368, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7bcc9bdf3689f07a
returns result = 0, handle = 0000000006F33F58
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 77d36be54a7e971e
returns result = 0, handle = 0000000006F34098
HackerDevice::CreatePixelShader called with BytecodeLength = 476, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8dbf69c3556c51ae
returns result = 0, handle = 0000000006F34198
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 77d36be54a7e971e
returns result = 0, handle = 0000000006F34558
HackerDevice::CreatePixelShader called with BytecodeLength = 1232, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 44e3320f5a50ac13
returns result = 0, handle = 0000000006F34658
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 77d36be54a7e971e
returns result = 0, handle = 0000000006F34798
HackerDevice::CreatePixelShader called with BytecodeLength = 1392, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ff068eb14431987f
returns result = 0, handle = 0000000006F348D8
HackerDevice::CreateVertexShader called with BytecodeLength = 532, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 55da5eab238de808
returns result = 0, handle = 0000000006F34A18
HackerDevice::CreatePixelShader called with BytecodeLength = 176, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2b1e982392fa63ca
returns result = 0, handle = 0000000006F34B18
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = fda6e65942630566
returns result = 0, handle = 0000000006F34C58
HackerDevice::CreatePixelShader called with BytecodeLength = 968, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = bae2b5372cc96f9a
returns result = 0, handle = 0000000006F34D98
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = fda6e65942630566
returns result = 0, handle = 0000000006F34ED8
HackerDevice::CreatePixelShader called with BytecodeLength = 348, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 4628e1a3a9df9736
returns result = 0, handle = 0000000006F34FD8
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = fda6e65942630566
returns result = 0, handle = 0000000006F35118
HackerDevice::CreatePixelShader called with BytecodeLength = 292, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d5e31fd5febae6c7
returns result = 0, handle = 0000000006F35258
HackerDevice::CreateVertexShader called with BytecodeLength = 1076, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2318cf9fb8992829
returns result = 0, handle = 0000000006F35398
HackerDevice::CreatePixelShader called with BytecodeLength = 516, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 5738c8b1a51cbe9d
returns result = 0, handle = 0000000006F35498
HackerDevice::CreateVertexShader called with BytecodeLength = 1088, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 86901a8204230f5a
returns result = 0, handle = 0000000006F355D8
HackerDevice::CreatePixelShader called with BytecodeLength = 516, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 8b31e34af61becb6
returns result = 0, handle = 0000000006F35718
HackerDevice::CreateVertexShader called with BytecodeLength = 784, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d9c39305ed8c0b2a
returns result = 0, handle = 0000000006F35858
HackerDevice::CreatePixelShader called with BytecodeLength = 396, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 0604bc2b6f888e19
returns result = 0, handle = 0000000006F35958
HackerDevice::CreateVertexShader called with BytecodeLength = 1076, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2318cf9fb8992829
returns result = 0, handle = 0000000007099498
HackerDevice::CreatePixelShader called with BytecodeLength = 496, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d5844fdc71eab2af
returns result = 0, handle = 00000000070995D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1296, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = ec628e14a7a2ac0d
returns result = 0, handle = 00000000070996D8
HackerDevice::CreatePixelShader called with BytecodeLength = 292, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = d8ec2293f94ec0aa
returns result = 0, handle = 0000000007099818
HackerDevice::CreateVertexShader called with BytecodeLength = 684, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = fda6e65942630566
returns result = 0, handle = 0000000007099958
HackerDevice::CreatePixelShader called with BytecodeLength = 360, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 29f04bd87941ab2f
returns result = 0, handle = 0000000007099A98
HackerDevice::CreateVertexShader called with BytecodeLength = 820, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = dc88077eb60add33
returns result = 0, handle = 0000000007099B98
HackerDevice::CreatePixelShader called with BytecodeLength = 416, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = f73b4e715a508828
returns result = 0, handle = 0000000007099CD8
Hooked_CreateDXGIFactory called with riid: IDXGIFactory
calling original CreateDXGIFactory API
CreateDXGIFactory1 returned factory = 00000000070A94C0, result = 0
new HackerDXGIFactory1(class HackerDXGIFactory1@0000000006BE7730) wrapped 00000000070A94C0
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@0000000006BE7730) adapter 0 requested
created HackerDXGIAdapter wrapper = 0000000006BE7760 of 0000000006A66500
returns result = 0
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@0000000006BE7760) called: output #0 requested
returns result = 0, handle = 0000000006AC7E30
HackerDXGIAdapter::EnumOutputs(class HackerDXGIAdapter@0000000006BE7760) called: output #1 requested
returns result = 887a0002, handle = 0000000000000000
HackerUnknown::Release(class HackerDXGIAdapter@0000000006BE7760), counter=0, this=0000000006BE7760
counter=0, this=0000000006BE7760, deleting self.
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory1@0000000006BE7730) adapter 1 requested
returns result = 0x887a0002
HackerUnknown::Release(class HackerDXGIFactory1@0000000006BE7730), counter=0, this=0000000006BE7730
counter=0, this=0000000006BE7730, deleting self.
*** HackerDXGIFactory::CreateSwapChain(class HackerDXGIFactory1@0000000006848550) called with parameters
Device = class HackerDevice@00000000063A8ED0
SwapChain = 00000000034411A0
Description = 000000000023F2D0
Windowed = 1
Width = 1024
Height = 720
Refresh rate = 0.000000
->Direct Mode: Forcing Width to = 2048
HackerDevice::GetHackerContext returns 0000000006831C20
Overlay::Overlay created for 0000000006F4DA40: class HackerDXGISwapChain
on HackerDevice: 00000000063A8ED0, HackerContext: 0000000006831C20
->HackerDXGISwapChain 0000000006F4DA40 created to wrap 00000000070B3DC0
Got resolution from swap chain: 2048x720
->return value = 0
HackerDXGIFactory::MakeWindowAssociation(class HackerDXGIFactory1@0000000006848550) called with WindowHandle = 0000000000151E58, Flags = 3
Flags = DXGI_MWA_NO_WINDOW_CHANGES(no monitoring) DXGI_MWA_NO_ALT_ENTER
returns result = 0
HackerDXGISwapChain::ResizeTarget(class HackerDXGISwapChain@0000000006F4DA40) called
returns result = 0
HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@0000000006F4DA40) called with
Fullscreen = 0
Target = 0000000000000000
returns 0
HackerDXGISwapChain::ResizeBuffers(class HackerDXGISwapChain@0000000006F4DA40) called
Got resolution from swap chain: 1024x720
returns result = 0
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709A518
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709A658
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709A798
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709A8D8
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709A9D8
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709AB18
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709AC58
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709AD98
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709AE98
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709AFD8
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 000000000709B118
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 000000000709B258
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 0000000006B09698
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 0000000006B097D8
HackerDevice::CreateVertexShader called with BytecodeLength = 636, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = a3cf8f84671cf15f
returns result = 0, handle = 0000000006B09918
HackerDevice::CreatePixelShader called with BytecodeLength = 244, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2da42e2681f7e662
returns result = 0, handle = 0000000006B09A58
updating stereo texture with eyeSeparation = 0.000000e+000, separation = 0.000000e+000, convergence = 0.000000e+000, active = 0
nvapi fetched screen width: 1280.000000, height: 720.000000
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
failed result = 80004002 for 000000000023EAA0
failed result = 80004002 for 000000000023EAA8
HackerDXGIDevice::GetAdapter(class HackerDXGIDevice1@00000000052C94B0) called with: 000000000023E808
created HackerDXGIAdapter wrapper = 0000000000467400 of 00000000052CBBD0
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter@0000000000467400) called
returns adapter: NVIDIA GeForce GTX 980 Ti, sysmem=0, vidmem=6342508544
HackerUnknown::Release(class HackerDXGIAdapter@0000000000467400), counter=4, this=0000000000467400
HackerUnknown::Release(class HackerDXGIDevice1@00000000052C94B0), counter=258, this=00000000052C94B0
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
HackerDevice::CreateVertexShader called with BytecodeLength = 1252, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2917d6a2498642c6
returns result = 0, handle = 0000000006B09F18
HackerDevice::CreatePixelShader called with BytecodeLength = 4340, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = dc610a7fb7c7c6ed
returns result = 0, handle = 0000000006B0A018
HackerDevice::CreateVertexShader called with BytecodeLength = 1708, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 67036394d6198fe5
returns result = 0, handle = 0000000006B0A298
HackerDevice::CreatePixelShader called with BytecodeLength = 3040, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 7c3b01c51995842c
returns result = 0, handle = 0000000006B0A3D8
HackerDevice::CreateVertexShader called with BytecodeLength = 1212, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = eca87ada1b6f621f
returns result = 0, handle = 0000000006FD2ED8
HackerDevice::CreatePixelShader called with BytecodeLength = 1824, handle = 0000000001F040A0, ClassLinkage = 0000000000000000
FNV hash = 2acac3f2105c6e50
returns result = 0, handle = 0000000006FD3018
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
failed result = 80004002 for 000000000023EE10
failed result = 80004002 for 000000000023EE18
nvapi_log.txt
NVapi DLL starting init - v 1.2.57 - Wed May 24 12:49:11 2017
[Logging]
calls=1
separation=1
convergence=1
[ConvergenceMap]
[Device]
full_screen=1
[Stereo]
force_no_nvapi=0
force_stereo=0
automatic_mode=0
unlock_separation=0
unlock_convergence=0
surface_createmode=-1
Wed May 24 12:49:11 2017
- NvAPI_Initialize called.
Wed May 24 12:49:11 2017
- Stereo_SetDriverMode called with mode = 2.
mode 2 means direct mode
Wed May 24 12:49:11 2017
- NvAPI_Initialize called.
Wed May 24 12:49:11 2017
- NvAPI_Initialize called.
Wed May 24 12:49:11 2017
- NvAPI_Initialize called.
Result = 0
Wed May 24 12:49:11 2017
- NvAPI_Initialize called.
Wed May 24 12:49:11 2017
- Stereo_CreateHandleFromIUnknown called with device = 0000000006886608. Result = 0
Wed May 24 12:49:15 2017
- NvAPI_Initialize called.
Wed May 24 12:49:15 2017
- Stereo_CreateHandleFromIUnknown called with device = 00000000001BA870. Result = 0
Wed May 24 12:49:16 2017
- Stereo_SetActiveEye called with StereoEye = 1. Result = 0
Wed May 24 12:49:16 2017
- Stereo_SetActiveEye called with StereoEye = 2. Result = 0
Wed May 24 12:49:16 2017
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
That actually looks pretty good to me. It's mostly running, and doing the work required, but is definitely confused on the screen size.
It's a very good sign that you can fetch the d3device, and also call SwapEyes without error. Double check the hex values of the d3device from our log and Unity to see that they match the same pointer.
My best guess here is that Unity creates the swapchain, starting with 1024x720 (maybe 768), and then does a resize to the game's actually expected state. The actual resolution wound up at the weird 2048x720 as reported at the end of the call.
For this scenario, it seems like it would work best to force the screen resolution as well as full screen state in the d3dx.ini. So, set the width= and height= parameters to what you think Unity will ultimately want to be using. That will then force override the resolution when the swap chain is created, and also 2x it for Direct Mode.
The error about returning E_NOINTERFACE is normal, and what we try to do as a general rule to force games to fall back to simpler and more compatible code paths. I think that is unrelated here, and it would be bad to use the platform_update here, because it's a lot more complicated and probably not quite right in 3Dmigoto. You can see it fall back from the 11.1 API to the 11.0 API because of that return. So the device created is actually a 11.0 version.
Basically, if it was working before with Automatic Mode, there is no reason to think that part would have changed.
Our logging is not quite right there, we are missing some call, and only seeing the return result.
If the force resolution does not seem to help, also set the debug=1, and unbuffered=1 so that we get a complete log, and I'll take another look.
That actually looks pretty good to me. It's mostly running, and doing the work required, but is definitely confused on the screen size.
It's a very good sign that you can fetch the d3device, and also call SwapEyes without error. Double check the hex values of the d3device from our log and Unity to see that they match the same pointer.
My best guess here is that Unity creates the swapchain, starting with 1024x720 (maybe 768), and then does a resize to the game's actually expected state. The actual resolution wound up at the weird 2048x720 as reported at the end of the call.
For this scenario, it seems like it would work best to force the screen resolution as well as full screen state in the d3dx.ini. So, set the width= and height= parameters to what you think Unity will ultimately want to be using. That will then force override the resolution when the swap chain is created, and also 2x it for Direct Mode.
The error about returning E_NOINTERFACE is normal, and what we try to do as a general rule to force games to fall back to simpler and more compatible code paths. I think that is unrelated here, and it would be bad to use the platform_update here, because it's a lot more complicated and probably not quite right in 3Dmigoto. You can see it fall back from the 11.1 API to the 11.0 API because of that return. So the device created is actually a 11.0 version.
Basically, if it was working before with Automatic Mode, there is no reason to think that part would have changed.
Our logging is not quite right there, we are missing some call, and only seeing the return result.
If the force resolution does not seem to help, also set the debug=1, and unbuffered=1 so that we get a complete log, and I'll take another look.
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
I got it working... kind of.
First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?
I tried running the test app in windowed mode but 3d vision failed to turn on. Oddly enough all the nvapi function calls worked without throwing any errors but it was swapping eyes at what seemed to be 30hz each. It might be possible to run it in windowed mode if i force 120hz in Unity. I tried forcing it in the .ini but that caused it to crash. I tried using both the 3d hub player and WOW profiles to see if it would work in windowed mode but that didn't help. switching to full-screen either via alt enter or fullscreen = 1 in .ini enables 3DVision successfully.
I'm still running into resolution issues, even after forcing it in the .ini. It still only renders half the screen and stretches it out to fulscreen, it looks like it's setting the viewport to half the horizontal resolution.
The main issue is the crashing during startup, but i found the cause. It's the same fucking problem i was having with INSIDE :/ if i enable shader hunting it doesn't crash but as soon as i set hunting = 0 and fullscreen it crashes, except it doesn't launch the app twice. I'm going to do a full driver wipe and install the latest set of drivers before i run more test or posts any logs... ugh i hate doing this since it ussually results in something else not working properly, either my Vive or my edid projector mod.
First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?
I tried running the test app in windowed mode but 3d vision failed to turn on. Oddly enough all the nvapi function calls worked without throwing any errors but it was swapping eyes at what seemed to be 30hz each. It might be possible to run it in windowed mode if i force 120hz in Unity. I tried forcing it in the .ini but that caused it to crash. I tried using both the 3d hub player and WOW profiles to see if it would work in windowed mode but that didn't help. switching to full-screen either via alt enter or fullscreen = 1 in .ini enables 3DVision successfully.
I'm still running into resolution issues, even after forcing it in the .ini. It still only renders half the screen and stretches it out to fulscreen, it looks like it's setting the viewport to half the horizontal resolution.
The main issue is the crashing during startup, but i found the cause. It's the same fucking problem i was having with INSIDE :/ if i enable shader hunting it doesn't crash but as soon as i set hunting = 0 and fullscreen it crashes, except it doesn't launch the app twice. I'm going to do a full driver wipe and install the latest set of drivers before i run more test or posts any logs... ugh i hate doing this since it ussually results in something else not working properly, either my Vive or my edid projector mod.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
[quote="sgsrules"]First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?[/quote]
Add this in the d3dx.ini should do the trick:
[code]StereoProfile = 1
Stereo - Enable = 0x00000001[/code]
sgsrules said:First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?
[quote="DHR"][quote="sgsrules"]First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?[/quote]
Add this in the d3dx.ini should do the trick:
[code]StereoProfile = 1
Stereo - Enable = 0x00000001[/code]
[/quote]
Thanks, that makes perfect sense.
Anyhow i wiped my display drivers and installed the latest ones. Unfortunately I'm still having the same issues plus new ones. INSIDE is still crashing and launching another copy. My test app for 3dVision Direct in Unity no longer works no matter what i do. The logs don't show anything useful, and most of the times it crashes before Unity gets a chance to dump a crash report. Unity did dump a crash report once saying that nvwgf2umx.dll caused an Access Violation. I tried running sfc /SCANNOW to fix any potential issues .it failed to fix any errors but mentioned that things where corrupt and to check the log file, which i can't even open, it's 450mb... Also tried reinstalling the directx runtime and it reported errors as well.
At this point I'm seriously considering doing a fresh OS install, it's been a while. Unless anyone else has a better idea.
sgsrules said:First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?
Add this in the d3dx.ini should do the trick:
StereoProfile = 1
Stereo - Enable = 0x00000001
Thanks, that makes perfect sense.
Anyhow i wiped my display drivers and installed the latest ones. Unfortunately I'm still having the same issues plus new ones. INSIDE is still crashing and launching another copy. My test app for 3dVision Direct in Unity no longer works no matter what i do. The logs don't show anything useful, and most of the times it crashes before Unity gets a chance to dump a crash report. Unity did dump a crash report once saying that nvwgf2umx.dll caused an Access Violation. I tried running sfc /SCANNOW to fix any potential issues .it failed to fix any errors but mentioned that things where corrupt and to check the log file, which i can't even open, it's 450mb... Also tried reinstalling the directx runtime and it reported errors as well.
At this point I'm seriously considering doing a fresh OS install, it's been a while. Unless anyone else has a better idea.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly.
It's always possible I missed something that Unity needs, that it calls in DX11. My test app is very simple.
The half-screen problem does sound like the ViewPort is off. When I force override the ViewPort size, it looks like I also modify the original input value, so it seems like maybe that gets passed back to Unity and gets it confused.
Let me fix that bug, and I'll post an update.
For the crash and relaunch, that is really weird, and as noted, I've not been able to reproduce it here, but I don't have all the pieces to test fully.
Before doing a reinstall, you might try a clean OS install on a different drive, just as a quick test to see if it solves the problem. That way if it doesn't work, you know your current system doesn't need a full rebuild. I've had sfc /scannow report errors that were unfixable, but it was some retarded bug from Microsoft, not an actual problem.
So for example, add or use another physical drive in your system for a clean install of the OS and setup for your test. The easiest way to do this is to make boot selectable in the BIOS, to switch which installation to boot to. You can do a dual boot out of the windows startup menu with partitions, but generally that is much harder to setup than you'd want.
Since you are running an Asus motherboard, it's very likely to match my BIOS, and I can say with assurance that the dual-drive works well. Hold F8 past the boot, and you get an easy drive selector.
If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly.
It's always possible I missed something that Unity needs, that it calls in DX11. My test app is very simple.
The half-screen problem does sound like the ViewPort is off. When I force override the ViewPort size, it looks like I also modify the original input value, so it seems like maybe that gets passed back to Unity and gets it confused.
Let me fix that bug, and I'll post an update.
For the crash and relaunch, that is really weird, and as noted, I've not been able to reproduce it here, but I don't have all the pieces to test fully.
Before doing a reinstall, you might try a clean OS install on a different drive, just as a quick test to see if it solves the problem. That way if it doesn't work, you know your current system doesn't need a full rebuild. I've had sfc /scannow report errors that were unfixable, but it was some retarded bug from Microsoft, not an actual problem.
So for example, add or use another physical drive in your system for a clean install of the OS and setup for your test. The easiest way to do this is to make boot selectable in the BIOS, to switch which installation to boot to. You can do a dual boot out of the windows startup menu with partitions, but generally that is much harder to setup than you'd want.
Since you are running an Asus motherboard, it's very likely to match my BIOS, and I can say with assurance that the dual-drive works well. Hold F8 past the boot, and you get an easy drive selector.
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
I don't know if it's useful for anything, since it's Android, but there is also that Google VR incorporated into Unity and Unreal.
https://developers.google.com/vr/unity/guide
[quote="bo3b"]If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly.
[/quote]
I've created a repo with source for the native plugin, unity script, sample scene and test app.
https://github.com/sgsrules/Unity3DVisionDirectPlugin
The native plugin is really basic, it's less than half a page of code and simply wraps 3 functions for unity to use.
the unity script loads the plugin, calls an init function that gets the NvAPI stereo handle, and during the update loop it calls the set left and right eye functions with a camera offset (not proper stereo).
The test app is located in Unity3DVisionDirectPlugin\UnityProject\TestBuild and should be ready to go. It locks up on my system after rendering a couple of frames, it doesn't even log any errors. It was working before i updated drivers, i tried reverting back to old drivers and the issue remains.
[quote="bo3b"]
It's always possible I missed something that Unity needs, that it calls in DX11. My test app is very simple.
The half-screen problem does sound like the ViewPort is off. When I force override the ViewPort size, it looks like I also modify the original input value, so it seems like maybe that gets passed back to Unity and gets it confused.
Let me fix that bug, and I'll post an update.
[/quote]
That sounds about right. I could always modify the viewport size in Unity, but that's really just fixing it with another hack which would probably cause other issues down the line.
[quote="bo3b"]
For the crash and relaunch, that is really weird, and as noted, I've not been able to reproduce it here, but I don't have all the pieces to test fully.
[/quote]
It's been driving me nuts because it was working fine while i was first working on the fix for INSIDE.
[quote="bo3b"]
Before doing a reinstall, you might try a clean OS install on a different drive, just as a quick test to see if it solves the problem. That way if it doesn't work, you know your current system doesn't need a full rebuild. I've had sfc /scannow report errors that were unfixable, but it was some retarded bug from Microsoft, not an actual problem.
So for example, add or use another physical drive in your system for a clean install of the OS and setup for your test. The easiest way to do this is to make boot selectable in the BIOS, to switch which installation to boot to. You can do a dual boot out of the windows startup menu with partitions, but generally that is much harder to setup than you'd want.
Since you are running an Asus motherboard, it's very likely to match my BIOS, and I can say with assurance that the dual-drive works well. Hold F8 past the boot, and you get an easy drive selector.[/quote]
I had a RAID drive setup that i used specifically for gaming, but one of the drives started giving me the click of death. Stupid mechanical drives >:( I haven't had time to rebuild the array, the replacement drive has been sitting on my desk for over a month. I'll rebuild it this weekend while reinstalling Windows on my main SSD. It's been a couple of years since i did a fresh install and I've moved the OS twice to different drives since then. Issues are starting to slowly pile up. last night i couldn't even boot into safe mode with a command prompt without it locking up.
bo3b said:If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly.
The native plugin is really basic, it's less than half a page of code and simply wraps 3 functions for unity to use.
the unity script loads the plugin, calls an init function that gets the NvAPI stereo handle, and during the update loop it calls the set left and right eye functions with a camera offset (not proper stereo).
The test app is located in Unity3DVisionDirectPlugin\UnityProject\TestBuild and should be ready to go. It locks up on my system after rendering a couple of frames, it doesn't even log any errors. It was working before i updated drivers, i tried reverting back to old drivers and the issue remains.
bo3b said:
It's always possible I missed something that Unity needs, that it calls in DX11. My test app is very simple.
The half-screen problem does sound like the ViewPort is off. When I force override the ViewPort size, it looks like I also modify the original input value, so it seems like maybe that gets passed back to Unity and gets it confused.
Let me fix that bug, and I'll post an update.
That sounds about right. I could always modify the viewport size in Unity, but that's really just fixing it with another hack which would probably cause other issues down the line.
bo3b said:
For the crash and relaunch, that is really weird, and as noted, I've not been able to reproduce it here, but I don't have all the pieces to test fully.
It's been driving me nuts because it was working fine while i was first working on the fix for INSIDE.
bo3b said:
Before doing a reinstall, you might try a clean OS install on a different drive, just as a quick test to see if it solves the problem. That way if it doesn't work, you know your current system doesn't need a full rebuild. I've had sfc /scannow report errors that were unfixable, but it was some retarded bug from Microsoft, not an actual problem.
So for example, add or use another physical drive in your system for a clean install of the OS and setup for your test. The easiest way to do this is to make boot selectable in the BIOS, to switch which installation to boot to. You can do a dual boot out of the windows startup menu with partitions, but generally that is much harder to setup than you'd want.
Since you are running an Asus motherboard, it's very likely to match my BIOS, and I can say with assurance that the dual-drive works well. Hold F8 past the boot, and you get an easy drive selector.
I had a RAID drive setup that i used specifically for gaming, but one of the drives started giving me the click of death. Stupid mechanical drives >:( I haven't had time to rebuild the array, the replacement drive has been sitting on my desk for over a month. I'll rebuild it this weekend while reinstalling Windows on my main SSD. It's been a couple of years since i did a fresh install and I've moved the OS twice to different drives since then. Issues are starting to slowly pile up. last night i couldn't even boot into safe mode with a command prompt without it locking up.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
[quote="sgsrules"][quote="bo3b"]If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly. [/quote]I've created a repo with source for the native plugin, unity script, sample scene and test app.
https://github.com/sgsrules/Unity3DVisionDirectPlugin
The native plugin is really basic, it's less than half a page of code and simply wraps 3 functions for unity to use.
the unity script loads the plugin, calls an init function that gets the NvAPI stereo handle, and during the update loop it calls the set left and right eye functions with a camera offset (not proper stereo).
The test app is located in Unity3DVisionDirectPlugin\UnityProject\TestBuild and should be ready to go. It locks up on my system after rendering a couple of frames, it doesn't even log any errors. It was working before i updated drivers, i tried reverting back to old drivers and the issue remains.[/quote]
Good deal, thanks for setting that up. I'll take a look at it later today.
Top-of-tree on 3Dmigoto now has this bug fix, and I also tested it with the Tutorial07 test app to be sure it works there. I'll try it against your plugin later today, but in case you wanted to give it a try, it's ready.
[quote="sgsrules"]I had a RAID drive setup that i used specifically for gaming, but one of the drives started giving me the click of death. Stupid mechanical drives >:( I haven't had time to rebuild the array, the replacement drive has been sitting on my desk for over a month. I'll rebuild it this weekend while reinstalling Windows on my main SSD. It's been a couple of years since i did a fresh install and I've moved the OS twice to different drives since then. Issues are starting to slowly pile up. last night i couldn't even boot into safe mode with a command prompt without it locking up.[/quote]
Yikes! Yeah, sounds like it's probably time for a fresh install. Always a drag because of all the little settings you've changed over time, but given the weird problems your having it seems like a good step.
bo3b said:If you can point me to a sample app for Unity, or show me what to add to a standard sample, I can try that out here, and debug further problems directly.
The native plugin is really basic, it's less than half a page of code and simply wraps 3 functions for unity to use.
the unity script loads the plugin, calls an init function that gets the NvAPI stereo handle, and during the update loop it calls the set left and right eye functions with a camera offset (not proper stereo).
The test app is located in Unity3DVisionDirectPlugin\UnityProject\TestBuild and should be ready to go. It locks up on my system after rendering a couple of frames, it doesn't even log any errors. It was working before i updated drivers, i tried reverting back to old drivers and the issue remains.
Good deal, thanks for setting that up. I'll take a look at it later today.
Top-of-tree on 3Dmigoto now has this bug fix, and I also tested it with the Tutorial07 test app to be sure it works there. I'll try it against your plugin later today, but in case you wanted to give it a try, it's ready.
sgsrules said:I had a RAID drive setup that i used specifically for gaming, but one of the drives started giving me the click of death. Stupid mechanical drives >:( I haven't had time to rebuild the array, the replacement drive has been sitting on my desk for over a month. I'll rebuild it this weekend while reinstalling Windows on my main SSD. It's been a couple of years since i did a fresh install and I've moved the OS twice to different drives since then. Issues are starting to slowly pile up. last night i couldn't even boot into safe mode with a command prompt without it locking up.
Yikes! Yeah, sounds like it's probably time for a fresh install. Always a drag because of all the little settings you've changed over time, but given the weird problems your having it seems like a good step.
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
So... the actual crash with the UnityTest app is because the RenderTarget and the DepthStencil are not the same size. Using the debug layer, I see it complain about them being mismatched right at the OMSetSetRenderTargets, and it crashes in that call.
The current 3Dmigoto will force the backbuffer to 2x size, which is typically picked up by a RenderTargetView via GetBuffer, then passed to CreateRenderTargetView. However, in this case, it's being passed in as 1x size. The DepthStencil is being created 2x in size, and thus does not match.
Not sure why the RenderTargetView is being created 1x size.
[s]More to the point, we probably actually want all of these to be 1x size, outside of the backbuffer itself.
The reason is because the game itself will have no knowledge of the larger buffer, and will be setting rendertargets and stencilviews with that in mind. If we 2x them, it will be confused, or stretch the image to the 2x size.
This line of thinking does suggest that we need to more actively manage the drawing view for the game.
Do you have access to the RenderTargetView, the DepthStencilView, and the ViewPorts at the C# level? It seems to me that we'll need to manage those pieces in your eye swap routines, to offset by the 1x width.[/s]
Edit: Not the right approach.
I'm playing with the sample app to see if I can narrow this down.
So... the actual crash with the UnityTest app is because the RenderTarget and the DepthStencil are not the same size. Using the debug layer, I see it complain about them being mismatched right at the OMSetSetRenderTargets, and it crashes in that call.
The current 3Dmigoto will force the backbuffer to 2x size, which is typically picked up by a RenderTargetView via GetBuffer, then passed to CreateRenderTargetView. However, in this case, it's being passed in as 1x size. The DepthStencil is being created 2x in size, and thus does not match.
Not sure why the RenderTargetView is being created 1x size.
More to the point, we probably actually want all of these to be 1x size, outside of the backbuffer itself.
The reason is because the game itself will have no knowledge of the larger buffer, and will be setting rendertargets and stencilviews with that in mind. If we 2x them, it will be confused, or stretch the image to the 2x size.
This line of thinking does suggest that we need to more actively manage the drawing view for the game.
Do you have access to the RenderTargetView, the DepthStencilView, and the ViewPorts at the C# level? It seems to me that we'll need to manage those pieces in your eye swap routines, to offset by the 1x width.
Edit: Not the right approach.
I'm playing with the sample app to see if I can narrow this down.
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
OK, the crash is fixed in top-of-tree 3Dmigoto.
The problem was that Unity always does a DXGI::ResizeBuffers at launch, and was resizing the backbuffer to 1x width instead of keeping it 2x. That made the later GetBuffer passed to CreateRenderTargetView have the wrong width.
Top-of-tree now has that fix, and the Unity test app no longer crashes. It activates stereo, and the overlay is visible. The image seems like it's the correct size, not stretched. It does not do proper stereo yet, but I think the underlying 3Dmigoto code is pretty close to correct now.
I also reviewed DarkStarSword's UE plugin code to see if I was missing anything, and we both took the same approach, so this seems pretty close. In his case, UE gives him access to before the CreateDevice, so he doesn't need the 3Dmigoto side.
The main takeaway here is that the underlying 3Dmigoto needs to force all the backbuffer chunks to 2x width, and the 1/2 size for each eye will need to be done in the higher layer during each eye drawing.
In my Tutorial07 test app, the only place this is done, is when the projection matrix is setup. In Unity, it's not as clear whether that is sufficient.
Edit: Ah, I see the test app is not doing proper projection matrix setup. So, I think this is working. Let me know if something doesn't seem right.
The problem was that Unity always does a DXGI::ResizeBuffers at launch, and was resizing the backbuffer to 1x width instead of keeping it 2x. That made the later GetBuffer passed to CreateRenderTargetView have the wrong width.
Top-of-tree now has that fix, and the Unity test app no longer crashes. It activates stereo, and the overlay is visible. The image seems like it's the correct size, not stretched. It does not do proper stereo yet, but I think the underlying 3Dmigoto code is pretty close to correct now.
I also reviewed DarkStarSword's UE plugin code to see if I was missing anything, and we both took the same approach, so this seems pretty close. In his case, UE gives him access to before the CreateDevice, so he doesn't need the 3Dmigoto side.
The main takeaway here is that the underlying 3Dmigoto needs to force all the backbuffer chunks to 2x width, and the 1/2 size for each eye will need to be done in the higher layer during each eye drawing.
In my Tutorial07 test app, the only place this is done, is when the projection matrix is setup. In Unity, it's not as clear whether that is sufficient.
Edit: Ah, I see the test app is not doing proper projection matrix setup. So, I think this is working. Let me know if something doesn't seem right.
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
[s] I tested the latest version and it's no longer crashing on my pc.[/s] Actually it still is, it just takes longer.
The main camera is using the correct size for the viewport but oddly enough the shadows are being rendered at the wrong width:
[url=http://www.iforce.co.nz/View.aspx?i=hqypjrt4.ded.jpg][img]http://iforce.co.nz/i/hqypjrt4.ded.jpg[/img][/url](BTW I'm not using the proper projection matrix setup, it's just a horizontal offset to quickly test with)
I tried changing the camera's viewport from within Unity but it ended up rendering half the screen, as expected, but the shadows were sill the incorrect width. Even if i stretch out the final image to cover the whole screen the shadows will still be off:[url=http://www.iforce.co.nz/View.aspx?i=5c5aysfs.cgy.jpg][img]http://iforce.co.nz/i/5c5aysfs.cgy.jpg[/img][/url]
I'm not sure if this is related but while I tested it out on my regular monitor in anaglyph mode it only renderered half the image and stretched it out like before, it looks like it also swapped eyes:[url=http://www.iforce.co.nz/View.aspx?i=4dwuxyj3.cbg.jpg][img]http://iforce.co.nz/i/4dwuxyj3.cbg.jpg[/img][/url]
I suspect that unity is getting it's viewport sizes that are used to render the main camera and the shadows from different sources. I've noticed that a lot of unity games are highly dependent on the desktop resolution before launching the game, unity seems to obtain a lot of it's dimensions based on actual screen size. For example, if i use nvidia's 4x DSR, Unity won't let me choose the 4x res unless i change the desktop resolution to 4x prior to launching the game. The main camera is probably obtaining it's size from the screen dimensions, which is why it's rendering correctly. The shadows on the other hand are probably getting there size directly from the size of the buffer.
Would it be possible to override the size that is being reported? That way Unity won't know that it's actually a 2x size buffer.
I tested the latest version and it's no longer crashing on my pc. Actually it still is, it just takes longer.
The main camera is using the correct size for the viewport but oddly enough the shadows are being rendered at the wrong width: (BTW I'm not using the proper projection matrix setup, it's just a horizontal offset to quickly test with)
I tried changing the camera's viewport from within Unity but it ended up rendering half the screen, as expected, but the shadows were sill the incorrect width. Even if i stretch out the final image to cover the whole screen the shadows will still be off:
I'm not sure if this is related but while I tested it out on my regular monitor in anaglyph mode it only renderered half the image and stretched it out like before, it looks like it also swapped eyes:
I suspect that unity is getting it's viewport sizes that are used to render the main camera and the shadows from different sources. I've noticed that a lot of unity games are highly dependent on the desktop resolution before launching the game, unity seems to obtain a lot of it's dimensions based on actual screen size. For example, if i use nvidia's 4x DSR, Unity won't let me choose the 4x res unless i change the desktop resolution to 4x prior to launching the game. The main camera is probably obtaining it's size from the screen dimensions, which is why it's rendering correctly. The shadows on the other hand are probably getting there size directly from the size of the buffer.
Would it be possible to override the size that is being reported? That way Unity won't know that it's actually a 2x size buffer.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
You mean like this:
https://github.com/DarkStarSword/UnrealEngine/tree/3DVision-4.14.3
You need to sign up (free) to Epic to see that repo
You might like to take a look at some of the code in the plugin, particularly what is under here:
https://github.com/DarkStarSword/UnrealEngine/tree/3DVision-4.14.3/Engine/Plugins/Runtime/NV3DVision/Source/NV3DVision/Private
In particular:
- The plugin fakes being a VR device so that UE4 initialises it automatically
- It uses 3D Vision Direct (this required a very early init to happen before the device was created)
- It uses a 200% wide buffer internally, and blits each side to each back buffer each frame (this is due to how native stereo is implemented in UE4 - my first choice would have been to maintain separate buffers).
- It supports the same separation and convergence controls by the driver
- It has logic to override the default convergence from the driver with something more suited to UE4, but will not override custom convergence values that a player might have saved in the profile
- It uses a 100% equivalent projection to that used by 3D Vision Automatic, but in the matrices instead of the formula (I do use the formula for HUD elements)
- It modifies both projection matrix *AND* the view origin (which will become part of one of the two view matrices) so that reflections render at correct depth
- It duplicates various types of UE4 HUD elements (bug: the mouse does not select the right element yet)
- It supports stereo depth on certain HUD elements (but this is unused by any game I know of)
- It behaves correctly when 3D Vision is disabled via control panel, ctrl+t, when alt+tabbing out, etc.
If any VR drivers are installed (Oculus) or plugged in (SteamVR), the game needs to be started with -hmd=NV3DVision to use exactly this plugin, as both Oculus and SteamVR will interfere with 3D Vision, even if the game does not actually support VR.
The main problem with this plugin, is there is no (AFAIK) way to inject it into an existing game - the developer would have to include this plugin, or I need to push it up to Epic so that all games using future versions of the engine will support it (this is what I was working towards before I was hit with another major depressive episode and had to give up gaming and modding again, so it's currently on hold... but it is 95% complete).
A couple of highlights incase you cbf getting access to the repo:
Initialising 3D Vision Direct:
Updating the internal separation and convergence to match the driver, with logic for overriding the inappropriate default from the driver without overriding a custom value (update_convergence and update_separation are set if the game has called an API I provided to change them, so you can probably assume they will always be false in your case):
Adjust projection matrix & view origin:
Queuing rendering commands to set the active back buffer (NvAPI_Stereo_SetActiveEye) then blit each side of the 200% width buffer to the appropriate stereo back buffer:
Adjusting a HUD element to a given world depth (this is not really used in UE4... I'm not sure if it ever was used... it's not even supported by the new style HUDs):
The nvapi lock may not be necessary - from the crashes I've seen I think it has more to do with which thread calls the nvapi functions than locking (render thread calls into nvapi don't crash, anything else might), but since we found it necessary to add locks around the nvapi calls in 3DMigoto I erred on the side of caution and added them in this plugin just in case.
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
It's fairly easy to inject a dll into Unity since it runs on mono. But, I have no idea if this is possible with UE4, maybe a commonly used library like steamworks could be hooked into? As you said it would be ideal if epic could just add support, you've already done most of the work so i don't see why they would be against it.
I thought about transforming the convergence * separation (ProjectionMatrix.M[3][0]) values to world space by multiplying it by the inverse projection matrix but never tried it out, good to know it works. I was doing all my stereo offsets in world space which worked fine, but i had to fudge the nvapi separation/convergence values which was less than ideal because values for one game wouldn't necessarily work for another game.
Brilliant work as usual DSS! Thanks for sharing this! I wish you the best of luck and hope things turn around for you.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
3dVision kicks in. In my plugin I'm able to get a d3d11device handle from unity and then call Stereo_CreateHandleFromIUnknown to get a stereo handle and i receive a NVAPI_OK status. I then call Stereo_SetActiveEye before rendering each frame and it returns a NVAPI_OK status for a few frames but then eventually crashes. I looked through the logs and noticed:
i tried allow_platform_update=1 but then it refuses to run in fullscreen, still crashes and says failed QueryInterface for ID3D11Device1 error in the log.
I think Unity is also not launching with the correct resolution. Unity's log says 1280x720 instead of 2560x720. The d3d11_log also says Width = 1024 Height = 720 and then forces width to 2048 so I'm not sure what it's actually running at. Before it crashes it renders half of the scene and then stretches this across the whole screen.
here are the logs:
d3d11_log.txt
nvapi_log.txt
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
It's a very good sign that you can fetch the d3device, and also call SwapEyes without error. Double check the hex values of the d3device from our log and Unity to see that they match the same pointer.
My best guess here is that Unity creates the swapchain, starting with 1024x720 (maybe 768), and then does a resize to the game's actually expected state. The actual resolution wound up at the weird 2048x720 as reported at the end of the call.
For this scenario, it seems like it would work best to force the screen resolution as well as full screen state in the d3dx.ini. So, set the width= and height= parameters to what you think Unity will ultimately want to be using. That will then force override the resolution when the swap chain is created, and also 2x it for Direct Mode.
The error about returning E_NOINTERFACE is normal, and what we try to do as a general rule to force games to fall back to simpler and more compatible code paths. I think that is unrelated here, and it would be bad to use the platform_update here, because it's a lot more complicated and probably not quite right in 3Dmigoto. You can see it fall back from the 11.1 API to the 11.0 API because of that return. So the device created is actually a 11.0 version.
Basically, if it was working before with Automatic Mode, there is no reason to think that part would have changed.
Our logging is not quite right there, we are missing some call, and only seeing the return result.
If the force resolution does not seem to help, also set the debug=1, and unbuffered=1 so that we get a complete log, and I'll take another look.
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
First off, I forgot to mention that the Sterero_Enable flag in the profile has to be set to WKS_STEREO_SUPPORT_ON, otherwise it won't work. I had set set StereoProfile = 1 in the .ini but that wasn't enough, i had to change the flag via nvidia inspector as well. Is there a way to do this in the .ini or through 3dmigoto?
I tried running the test app in windowed mode but 3d vision failed to turn on. Oddly enough all the nvapi function calls worked without throwing any errors but it was swapping eyes at what seemed to be 30hz each. It might be possible to run it in windowed mode if i force 120hz in Unity. I tried forcing it in the .ini but that caused it to crash. I tried using both the 3d hub player and WOW profiles to see if it would work in windowed mode but that didn't help. switching to full-screen either via alt enter or fullscreen = 1 in .ini enables 3DVision successfully.
I'm still running into resolution issues, even after forcing it in the .ini. It still only renders half the screen and stretches it out to fulscreen, it looks like it's setting the viewport to half the horizontal resolution.
The main issue is the crashing during startup, but i found the cause. It's the same fucking problem i was having with INSIDE :/ if i enable shader hunting it doesn't crash but as soon as i set hunting = 0 and fullscreen it crashes, except it doesn't launch the app twice. I'm going to do a full driver wipe and install the latest set of drivers before i run more test or posts any logs... ugh i hate doing this since it ussually results in something else not working properly, either my Vive or my edid projector mod.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
Add this in the d3dx.ini should do the trick:
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
Thanks, that makes perfect sense.
Anyhow i wiped my display drivers and installed the latest ones. Unfortunately I'm still having the same issues plus new ones. INSIDE is still crashing and launching another copy. My test app for 3dVision Direct in Unity no longer works no matter what i do. The logs don't show anything useful, and most of the times it crashes before Unity gets a chance to dump a crash report. Unity did dump a crash report once saying that nvwgf2umx.dll caused an Access Violation. I tried running sfc /SCANNOW to fix any potential issues .it failed to fix any errors but mentioned that things where corrupt and to check the log file, which i can't even open, it's 450mb... Also tried reinstalling the directx runtime and it reported errors as well.
At this point I'm seriously considering doing a fresh OS install, it's been a while. Unless anyone else has a better idea.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
It's always possible I missed something that Unity needs, that it calls in DX11. My test app is very simple.
The half-screen problem does sound like the ViewPort is off. When I force override the ViewPort size, it looks like I also modify the original input value, so it seems like maybe that gets passed back to Unity and gets it confused.
Let me fix that bug, and I'll post an update.
For the crash and relaunch, that is really weird, and as noted, I've not been able to reproduce it here, but I don't have all the pieces to test fully.
Before doing a reinstall, you might try a clean OS install on a different drive, just as a quick test to see if it solves the problem. That way if it doesn't work, you know your current system doesn't need a full rebuild. I've had sfc /scannow report errors that were unfixable, but it was some retarded bug from Microsoft, not an actual problem.
So for example, add or use another physical drive in your system for a clean install of the OS and setup for your test. The easiest way to do this is to make boot selectable in the BIOS, to switch which installation to boot to. You can do a dual boot out of the windows startup menu with partitions, but generally that is much harder to setup than you'd want.
Since you are running an Asus motherboard, it's very likely to match my BIOS, and I can say with assurance that the dual-drive works well. Hold F8 past the boot, and you get an easy drive selector.
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
https://developers.google.com/vr/unity/guide
I've created a repo with source for the native plugin, unity script, sample scene and test app.
https://github.com/sgsrules/Unity3DVisionDirectPlugin
The native plugin is really basic, it's less than half a page of code and simply wraps 3 functions for unity to use.
the unity script loads the plugin, calls an init function that gets the NvAPI stereo handle, and during the update loop it calls the set left and right eye functions with a camera offset (not proper stereo).
The test app is located in Unity3DVisionDirectPlugin\UnityProject\TestBuild and should be ready to go. It locks up on my system after rendering a couple of frames, it doesn't even log any errors. It was working before i updated drivers, i tried reverting back to old drivers and the issue remains.
That sounds about right. I could always modify the viewport size in Unity, but that's really just fixing it with another hack which would probably cause other issues down the line.
It's been driving me nuts because it was working fine while i was first working on the fix for INSIDE.
I had a RAID drive setup that i used specifically for gaming, but one of the drives started giving me the click of death. Stupid mechanical drives >:( I haven't had time to rebuild the array, the replacement drive has been sitting on my desk for over a month. I'll rebuild it this weekend while reinstalling Windows on my main SSD. It's been a couple of years since i did a fresh install and I've moved the OS twice to different drives since then. Issues are starting to slowly pile up. last night i couldn't even boot into safe mode with a command prompt without it locking up.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z
Good deal, thanks for setting that up. I'll take a look at it later today.
Top-of-tree on 3Dmigoto now has this bug fix, and I also tested it with the Tutorial07 test app to be sure it works there. I'll try it against your plugin later today, but in case you wanted to give it a try, it's ready.
Yikes! Yeah, sounds like it's probably time for a fresh install. Always a drag because of all the little settings you've changed over time, but given the weird problems your having it seems like a good step.
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
The current 3Dmigoto will force the backbuffer to 2x size, which is typically picked up by a RenderTargetView via GetBuffer, then passed to CreateRenderTargetView. However, in this case, it's being passed in as 1x size. The DepthStencil is being created 2x in size, and thus does not match.
Not sure why the RenderTargetView is being created 1x size.
More to the point, we probably actually want all of these to be 1x size, outside of the backbuffer itself.
The reason is because the game itself will have no knowledge of the larger buffer, and will be setting rendertargets and stencilviews with that in mind. If we 2x them, it will be confused, or stretch the image to the 2x size.
This line of thinking does suggest that we need to more actively manage the drawing view for the game.
Do you have access to the RenderTargetView, the DepthStencilView, and the ViewPorts at the C# level? It seems to me that we'll need to manage those pieces in your eye swap routines, to offset by the 1x width.
Edit: Not the right approach.
I'm playing with the sample app to see if I can narrow this down.
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
The problem was that Unity always does a DXGI::ResizeBuffers at launch, and was resizing the backbuffer to 1x width instead of keeping it 2x. That made the later GetBuffer passed to CreateRenderTargetView have the wrong width.
Top-of-tree now has that fix, and the Unity test app no longer crashes. It activates stereo, and the overlay is visible. The image seems like it's the correct size, not stretched. It does not do proper stereo yet, but I think the underlying 3Dmigoto code is pretty close to correct now.
I also reviewed DarkStarSword's UE plugin code to see if I was missing anything, and we both took the same approach, so this seems pretty close. In his case, UE gives him access to before the CreateDevice, so he doesn't need the 3Dmigoto side.
The main takeaway here is that the underlying 3Dmigoto needs to force all the backbuffer chunks to 2x width, and the 1/2 size for each eye will need to be done in the higher layer during each eye drawing.
In my Tutorial07 test app, the only place this is done, is when the projection matrix is setup. In Unity, it's not as clear whether that is sufficient.
Edit: Ah, I see the test app is not doing proper projection matrix setup. So, I think this is working. Let me know if something doesn't seem right.
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
I tested the latest version and it's no longer crashing on my pc.Actually it still is, it just takes longer.The main camera is using the correct size for the viewport but oddly enough the shadows are being rendered at the wrong width:
I tried changing the camera's viewport from within Unity but it ended up rendering half the screen, as expected, but the shadows were sill the incorrect width. Even if i stretch out the final image to cover the whole screen the shadows will still be off:
I'm not sure if this is related but while I tested it out on my regular monitor in anaglyph mode it only renderered half the image and stretched it out like before, it looks like it also swapped eyes:
I suspect that unity is getting it's viewport sizes that are used to render the main camera and the shadows from different sources. I've noticed that a lot of unity games are highly dependent on the desktop resolution before launching the game, unity seems to obtain a lot of it's dimensions based on actual screen size. For example, if i use nvidia's 4x DSR, Unity won't let me choose the 4x res unless i change the desktop resolution to 4x prior to launching the game. The main camera is probably obtaining it's size from the screen dimensions, which is why it's rendering correctly. The shadows on the other hand are probably getting there size directly from the size of the buffer.
Would it be possible to override the size that is being reported? That way Unity won't know that it's actually a 2x size buffer.
Like my work? You can send a donation via Paypal to sgs.rules@gmail.com
Windows 7 Pro 64x - Nvidia Driver 398.82 - EVGA 980Ti SC - Optoma HD26 with Edid override - 3D Vision 2 - i7-8700K CPU at 5.0Ghz - ASROCK Z370 Ext 4 Motherboard - 32 GB RAM Corsair Vengeance - 512 GB Samsung SSD 850 Pro - Creative Sound Blaster Z