SOMA: 3D Vision Support Thread
  2 / 35    
[quote="D-Man11"]@Seregin Look in the config file and see if there anything that contains the word SwapInterval and try changing the value for it. like False to true or 1 to 2, etc[/quote] Thanks, gonna try. [b]OMG[/b], guys... This game is gonna be SOMETHING! Just a ~30 minutes into it, and I absolutely LOVE it! I have forgotten already how interactive and awesome [i]Frictional Games[/i] creations are...
D-Man11 said:@Seregin

Look in the config file and see if there anything that contains the word SwapInterval and try changing the value for it. like False to true or 1 to 2, etc

Thanks, gonna try.

OMG, guys... This game is gonna be SOMETHING! Just a ~30 minutes into it, and I absolutely LOVE it! I have forgotten already how interactive and awesome Frictional Games creations are...

ASUS Prime z370-A, i5 8600K, ASUS GTX 1080 Ti Strix, 16 GB DDR4, Corsair AX860i PSU, ASUS VG278HR, 3D Vision 2, Sound Blaster Z, Astro A50 Headphones, Windows 10 64-bit Home

#16
Posted 09/22/2015 07:39 PM   
This is awesome project, it is strange you never heard of it. Thanks, Helifax, games like that benefits much from 3d, so much!
This is awesome project, it is strange you never heard of it.
Thanks, Helifax, games like that benefits much from 3d, so much!

#17
Posted 09/22/2015 09:10 PM   
Well good news is that I was able to make it work in 3D...yey! Bad news is that shadows and other effects are broken.... I am having difficulty trying to correct the shadows which for some reason doesn't want to work.... Shadows look correct from one angle but the moment you rotate it breaks:( The vertex shader is just a simple pass-through one. The pixel shaders looks like this: [code] #version 330 uniform float g_eye; uniform float g_eye_separation; uniform float g_convergence; uniform float g_pixelEnabled; #extension GL_ARB_explicit_attrib_location : enable #extension GL_ARB_uniform_buffer_object : enable #extension GL_ARB_shading_language_420pack: enable //////////////////////////////////////////////////////// // Deferred G-Buffer Light - Fragment Shader // // A shader applied to the accumlation buffer, using the // G-buffer targets as input. // // Postion retrival from depth: // The position gvFarPlanePos is at the far plane and the far x,y and z postions can be thought of as a "trinagle" // The wanted position can also be thought of as a "triangle" with the same ratio as the far one. The ratio is expressed as // the stored depth value since it is wanted_pos.z/farplane. // //////////////////////////////////////////////////////// //-------------------------------------------------------------- /////////////////////////////// // Shadow helper functions float ShadowOffsetLookup(sampler2DShadow aShadowMap, vec4 avLocation, vec2 avOffset) { return texture(aShadowMap, vec3((avLocation.xy + avOffset).xy, avLocation.z)); } //-------------------------------------------------------------- ///////////////////// //Uniform varaibles layout(std140, binding = 0) uniform cLightArguments { mat4 a_mtxViewProjection; mat4 a_mtxProjection; mat4 a_mtxView; mat4 a_mtxInvViewProjection; mat4 a_mtxInvProjection; mat4 a_mtxInvView; float afFarPlane; float afNearPlane; float afNearByFarPlane; float afInvFarPlane; vec4 avScreenToFarPlane; vec2 avInvScreenSize; vec2 avFogStartAndLength; vec4 avFogColor; vec3 avViewSpaceUp; float afFogFalloffExp; int alInstanceOffset; int alInstanceStride; vec2 avPadding; }; //////////////////// //Textures layout(binding = 0) uniform sampler2D aDiffuseMap; layout(binding = 1) uniform sampler2D aNormalDepthMap; layout(binding = 2) uniform sampler2D aSpecMap; //////////////////////////// //Additional textures //Spot light //Point light //Shadow map layout(binding = 6) uniform sampler2DShadow aShadowMap; layout(binding = 7) uniform sampler2D aShadowOffsetMap; vec3 GetPos(in vec2 avUV, float afDepth) { return vec3(avUV.xy * avScreenToFarPlane.xy + avScreenToFarPlane.zw, -afFarPlane) * afDepth; } //-------------------------------------------------------------- /////////////////////////////// // Main program in vec4 px_vPosition; in vec4 px_vLightPosScale; in float px_fFalloff; in vec4 px_vLightColor; in float px_fTranslucenyMul; in vec2 px_vShadowOffsetMul; in mat4x4 px_mtxLightViewProj; in float px_fSpotFalloffPow; layout(location = 0) out vec4 out_vColor; void main() { vec4 px_vPosition = gl_FragCoord; bool px_bFrontFacing = gl_FrontFacing; int px_lPrimitiveID = gl_PrimitiveID; ///////////////////////////////// //Get values from samplers vec2 vMapCoords = px_vPosition.xy * avInvScreenSize; vec4 vColorVal = texture(aDiffuseMap, vMapCoords); vec4 vNormalDepthVal = texture(aNormalDepthMap, vMapCoords); ///////////////////////////////// // Get postion float fDepth = vNormalDepthVal.w; vec3 vPos = GetPos(px_vPosition.xy, fDepth); ///////////////////////////////// // Light direction and attenuation vec3 vLightDir = px_vLightPosScale.xyz - vPos; float fDistance = sqrt(dot(vLightDir,vLightDir)); float fAttenuatuion = pow(1.0 - min(fDistance * px_vLightPosScale.w, 1.0), px_fFalloff); vLightDir = normalize( vLightDir ); ///////////////////////////////// //Unpack normal and normalize (if needed) vec3 vNormal = vNormalDepthVal.xyz; vNormal = normalize(vNormal); vec3 vEye = -normalize(vPos); ////////////////////////////// // Spot attentuation / gobo // Apply normal based bias vPos += vNormal * (1 - dot(vNormal, vLightDir)) * 0.05; vec4 vProjectedUv = ((px_mtxLightViewProj) * (vec4(vPos,1.0))); vProjectedUv = vec4(vProjectedUv.xyz, 1.0) / vProjectedUv.w; // Stereo correction ? This is the place it should be since we are altering the Projection for the lights vProjectedUv.x -= g_eye * g_eye_separation * (-vProjectedUv.z - g_convergence) * a_mtxInvProjection[0].x; fAttenuatuion *= pow(max(0.0, 1.0 - distance(vProjectedUv.xy, vec2(0.5)) * 2.0), px_fSpotFalloffPow); ////////// // Apply near clip fAttenuatuion *= max(0, vProjectedUv.z) * clamp((1.0 - vProjectedUv.z) * 128.0, 0.0, 1.0); if(fAttenuatuion <= 0.0) discard; ////////////////////////////// //Point gobo ///////////////////////////////// //Calculate specular amount vec4 vSpecVal = texture(aSpecMap, vMapCoords); //Convert color to linear space if needed vec3 vSpecIntensity = vSpecVal.xyz; float fSpecPower = vSpecVal.w; vec3 vHalfVec = normalize(vLightDir + vEye); fSpecPower = exp2(fSpecPower * 10.0) + 1.0;//Range 0 - 1024 // Calculate the enegry conservation value, this will make sure that the intergral of the specular is 1.0 float fEngeryConservation = (fSpecPower + 8.0) * (1.0 / (8.0 * 3.141592)); vec3 vSpecular = px_vLightColor.w * vSpecIntensity * min(fEngeryConservation * pow(max(dot(vHalfVec, vNormal.xyz), 0.0) ,fSpecPower ), 1.0); vSpecular *= px_vLightColor.xyz; //////////////////////////////////////////// // Ambient light ///////////////////////////////// //Calculate diffuse color float fLDotN = dot( vLightDir, vNormal.xyz); float fLightAmount = max(fLDotN, 0.0); float fLightScatterAmount = max(-fLDotN, 0.0); /////////// // A cheaper version of Dice Translucency // Refract the incoming light with the normal float fLightTransport = clamp(dot(vEye, vLightDir + vNormal.xyz * 0.2),-1.0, 0.0); fLightTransport = pow(fLightTransport, 16.0); //////// // Apply energy conservation and ambient scattering float fLightScatter = (min(2.0, fLightTransport * 16.0) + fLightScatterAmount) * vColorVal.w; vec3 vDiffuse = vColorVal.xyz * px_vLightColor.xyz * (fLightAmount+fLightScatter * px_fTranslucenyMul); ///////////////////////////////// // Caclulate shadow (if any) float fShadowAmount=0; vec2 vFinalScattterMul = px_vShadowOffsetMul * vProjectedUv.w; //////////////////////// // No Smoothing //Set up variables float fShadowSum = 0; float fJitterZ =0; vec2 vScreenJitterCoord = px_vPosition.xy * 0.031250; vScreenJitterCoord.y = fract(vScreenJitterCoord.y); //Make sure the coord is in 0 - 1 range vScreenJitterCoord.y *= 1.0 / 16; //Access only first texture piece //////////////// // Shader Model 3, Dynamic Branching available //////////////// // Cheap pre-test // Note1: division must occur when getting samples else gfx card gets angry.) // Note2: It _must_ be division! doing sample * 1/8 will fail!! for(int i=0; i<2.0; i++) { vec2 vJitterLookupCoord = vec2(vScreenJitterCoord.x, vScreenJitterCoord.y + fJitterZ); vec4 vOffset = texture(aShadowOffsetMap, vJitterLookupCoord) *2.0-1.0; fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.xy) * vFinalScattterMul ) / 4.0; fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.zw) * vFinalScattterMul ) / 4.0; fJitterZ += 1.0 / 16; } //////////////// // Check if in penumbra if( (fShadowSum-1.0) * fShadowSum * fLightAmount != 0) { //Multiply, so the X presamples only affect their part (X/all_samples) of samples taken. fShadowSum *= 4.0 / 32; //////////////// // Fullscale filtering for(int i=0; i<16-2.0; i++) { vec2 vJitterLookupCoord = vec2(vScreenJitterCoord.x, vScreenJitterCoord.y + fJitterZ); //Not that coords are 0-1! vec4 vOffset = texture(aShadowOffsetMap, vJitterLookupCoord) *2.0 - 1.0; fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.xy) * vFinalScattterMul ) / 32; fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.zw) * vFinalScattterMul ) / 32; fJitterZ += 1.0 / 16; } //vDiffuse.xyz = cVector3f(0,0,1); } /*else { if(fShadowSum>0.5) vDiffuse.xyz = vec3(1,0,0); else vDiffuse.xyz = vec3(0,1,0); //fAttenuatuion *= fShadowSum; }*/ ///////////////////// // No Dynamic Branching ///////////////////// // Add shadow sum to attenuation fShadowAmount = fShadowSum; fAttenuatuion *= fShadowAmount; ///////////////////////////////// //Calculate Final color vDiffuse += vSpecular; vDiffuse *= fAttenuatuion; // Multiply with 8.0 to increase precision out_vColor.xyz =vDiffuse * 8.0; out_vColor.w = 0; if(g_pixelEnabled < 1.0) {out_vColor = vec4(0.0);} } [/code] Any idea on what I am doing wrong? I can't see what can be wrong here...
Well good news is that I was able to make it work in 3D...yey!

Bad news is that shadows and other effects are broken.... I am having difficulty trying to correct the shadows which for some reason doesn't want to work.... Shadows look correct from one angle but the moment you rotate it breaks:(

The vertex shader is just a simple pass-through one.
The pixel shaders looks like this:

#version 330 
uniform float g_eye;
uniform float g_eye_separation;
uniform float g_convergence;
uniform float g_pixelEnabled;
#extension GL_ARB_explicit_attrib_location : enable
#extension GL_ARB_uniform_buffer_object : enable
#extension GL_ARB_shading_language_420pack: enable
////////////////////////////////////////////////////////

// Deferred G-Buffer Light - Fragment Shader

//

// A shader applied to the accumlation buffer, using the

// G-buffer targets as input.

//

// Postion retrival from depth:

// The position gvFarPlanePos is at the far plane and the far x,y and z postions can be thought of as a "trinagle"

// The wanted position can also be thought of as a "triangle" with the same ratio as the far one. The ratio is expressed as

// the stored depth value since it is wanted_pos.z/farplane.

//

////////////////////////////////////////////////////////








//--------------------------------------------------------------



///////////////////////////////

// Shadow helper functions



float ShadowOffsetLookup(sampler2DShadow aShadowMap, vec4 avLocation, vec2 avOffset)

{

return texture(aShadowMap, vec3((avLocation.xy + avOffset).xy, avLocation.z));

}



//--------------------------------------------------------------






/////////////////////

//Uniform varaibles



layout(std140, binding = 0) uniform cLightArguments

{

mat4 a_mtxViewProjection;

mat4 a_mtxProjection;

mat4 a_mtxView;

mat4 a_mtxInvViewProjection;

mat4 a_mtxInvProjection;

mat4 a_mtxInvView;



float afFarPlane;

float afNearPlane;

float afNearByFarPlane;

float afInvFarPlane;



vec4 avScreenToFarPlane;

vec2 avInvScreenSize;



vec2 avFogStartAndLength;

vec4 avFogColor;



vec3 avViewSpaceUp;

float afFogFalloffExp;



int alInstanceOffset;

int alInstanceStride;

vec2 avPadding;




};



////////////////////

//Textures

layout(binding = 0) uniform sampler2D aDiffuseMap;

layout(binding = 1) uniform sampler2D aNormalDepthMap;




layout(binding = 2) uniform sampler2D aSpecMap;




////////////////////////////

//Additional textures



//Spot light



//Point light




//Shadow map


layout(binding = 6) uniform sampler2DShadow aShadowMap;


layout(binding = 7) uniform sampler2D aShadowOffsetMap;





vec3 GetPos(in vec2 avUV, float afDepth)

{

return vec3(avUV.xy * avScreenToFarPlane.xy + avScreenToFarPlane.zw, -afFarPlane) * afDepth;

}






//--------------------------------------------------------------



///////////////////////////////

// Main program

in vec4 px_vPosition;
in vec4 px_vLightPosScale;
in float px_fFalloff;
in vec4 px_vLightColor;
in float px_fTranslucenyMul;
in vec2 px_vShadowOffsetMul;
in mat4x4 px_mtxLightViewProj;
in float px_fSpotFalloffPow;
layout(location = 0) out vec4 out_vColor;

void main()

{
vec4 px_vPosition = gl_FragCoord;
bool px_bFrontFacing = gl_FrontFacing;
int px_lPrimitiveID = gl_PrimitiveID;



/////////////////////////////////

//Get values from samplers

vec2 vMapCoords = px_vPosition.xy * avInvScreenSize;

vec4 vColorVal = texture(aDiffuseMap, vMapCoords);

vec4 vNormalDepthVal = texture(aNormalDepthMap, vMapCoords);






/////////////////////////////////

// Get postion

float fDepth = vNormalDepthVal.w;

vec3 vPos = GetPos(px_vPosition.xy, fDepth);



/////////////////////////////////

// Light direction and attenuation


vec3 vLightDir = px_vLightPosScale.xyz - vPos;

float fDistance = sqrt(dot(vLightDir,vLightDir));

float fAttenuatuion = pow(1.0 - min(fDistance * px_vLightPosScale.w, 1.0), px_fFalloff);

vLightDir = normalize( vLightDir );










/////////////////////////////////

//Unpack normal and normalize (if needed)

vec3 vNormal = vNormalDepthVal.xyz;




vNormal = normalize(vNormal);

vec3 vEye = -normalize(vPos);






//////////////////////////////

// Spot attentuation / gobo


// Apply normal based bias

vPos += vNormal * (1 - dot(vNormal, vLightDir)) * 0.05;




vec4 vProjectedUv = ((px_mtxLightViewProj) * (vec4(vPos,1.0)));
vProjectedUv = vec4(vProjectedUv.xyz, 1.0) / vProjectedUv.w;

// Stereo correction ? This is the place it should be since we are altering the Projection for the lights
vProjectedUv.x -= g_eye * g_eye_separation * (-vProjectedUv.z - g_convergence) * a_mtxInvProjection[0].x;


fAttenuatuion *= pow(max(0.0, 1.0 - distance(vProjectedUv.xy, vec2(0.5)) * 2.0), px_fSpotFalloffPow);



//////////

// Apply near clip

fAttenuatuion *= max(0, vProjectedUv.z) *

clamp((1.0 - vProjectedUv.z) * 128.0, 0.0, 1.0);



if(fAttenuatuion <= 0.0) discard;


//////////////////////////////

//Point gobo




/////////////////////////////////

//Calculate specular amount


vec4 vSpecVal = texture(aSpecMap, vMapCoords);



//Convert color to linear space if needed





vec3 vSpecIntensity = vSpecVal.xyz;

float fSpecPower = vSpecVal.w;



vec3 vHalfVec = normalize(vLightDir + vEye);

fSpecPower = exp2(fSpecPower * 10.0) + 1.0;//Range 0 - 1024



// Calculate the enegry conservation value, this will make sure that the intergral of the specular is 1.0

float fEngeryConservation = (fSpecPower + 8.0) * (1.0 / (8.0 * 3.141592));

vec3 vSpecular = px_vLightColor.w * vSpecIntensity * min(fEngeryConservation * pow(max(dot(vHalfVec, vNormal.xyz), 0.0) ,fSpecPower ), 1.0);

vSpecular *= px_vLightColor.xyz;







////////////////////////////////////////////

// Ambient light




/////////////////////////////////

//Calculate diffuse color

float fLDotN = dot( vLightDir, vNormal.xyz);

float fLightAmount = max(fLDotN, 0.0);

float fLightScatterAmount = max(-fLDotN, 0.0);




///////////

// A cheaper version of Dice Translucency

// Refract the incoming light with the normal

float fLightTransport = clamp(dot(vEye, vLightDir + vNormal.xyz * 0.2),-1.0, 0.0);

fLightTransport = pow(fLightTransport, 16.0);



////////

// Apply energy conservation and ambient scattering

float fLightScatter = (min(2.0, fLightTransport * 16.0) + fLightScatterAmount) * vColorVal.w;




vec3 vDiffuse = vColorVal.xyz * px_vLightColor.xyz * (fLightAmount+fLightScatter * px_fTranslucenyMul);



/////////////////////////////////

// Caclulate shadow (if any)




float fShadowAmount=0;



vec2 vFinalScattterMul = px_vShadowOffsetMul * vProjectedUv.w;





////////////////////////

// No Smoothing


//Set up variables

float fShadowSum = 0;

float fJitterZ =0;

vec2 vScreenJitterCoord = px_vPosition.xy * 0.031250;



vScreenJitterCoord.y = fract(vScreenJitterCoord.y); //Make sure the coord is in 0 - 1 range

vScreenJitterCoord.y *= 1.0 / 16; //Access only first texture piece





////////////////

// Shader Model 3, Dynamic Branching available


////////////////

// Cheap pre-test

// Note1: division must occur when getting samples else gfx card gets angry.)

// Note2: It _must_ be division! doing sample * 1/8 will fail!!

for(int i=0; i<2.0; i++)

{

vec2 vJitterLookupCoord = vec2(vScreenJitterCoord.x, vScreenJitterCoord.y + fJitterZ);



vec4 vOffset = texture(aShadowOffsetMap, vJitterLookupCoord) *2.0-1.0;



fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.xy) * vFinalScattterMul ) / 4.0;

fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.zw) * vFinalScattterMul ) / 4.0;



fJitterZ += 1.0 / 16;

}



////////////////

// Check if in penumbra

if( (fShadowSum-1.0) * fShadowSum * fLightAmount != 0)

{

//Multiply, so the X presamples only affect their part (X/all_samples) of samples taken.

fShadowSum *= 4.0 / 32;



////////////////

// Fullscale filtering

for(int i=0; i<16-2.0; i++)

{

vec2 vJitterLookupCoord = vec2(vScreenJitterCoord.x, vScreenJitterCoord.y + fJitterZ); //Not that coords are 0-1!



vec4 vOffset = texture(aShadowOffsetMap, vJitterLookupCoord) *2.0 - 1.0;



fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.xy) * vFinalScattterMul ) / 32;

fShadowSum += ShadowOffsetLookup(aShadowMap, vProjectedUv, vec2(vOffset.zw) * vFinalScattterMul ) / 32;



fJitterZ += 1.0 / 16;

}



//vDiffuse.xyz = cVector3f(0,0,1);

}

/*else

{

if(fShadowSum>0.5) vDiffuse.xyz = vec3(1,0,0);

else vDiffuse.xyz = vec3(0,1,0);



//fAttenuatuion *= fShadowSum;

}*/

/////////////////////

// No Dynamic Branching






/////////////////////

// Add shadow sum to attenuation

fShadowAmount = fShadowSum;







fAttenuatuion *= fShadowAmount;







/////////////////////////////////

//Calculate Final color







vDiffuse += vSpecular;




vDiffuse *= fAttenuatuion;












// Multiply with 8.0 to increase precision

out_vColor.xyz =vDiffuse * 8.0;

out_vColor.w = 0;
if(g_pixelEnabled < 1.0)
{out_vColor = vec4(0.0);}



}


Any idea on what I am doing wrong? I can't see what can be wrong here...

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


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

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

#18
Posted 09/22/2015 09:41 PM   
GAH, I really wish I knew coding Helifax because I'd be more than willing to help. I'm literally holding myself out from SOMA to play it in VR!
GAH, I really wish I knew coding Helifax because I'd be more than willing to help. I'm literally holding myself out from SOMA to play it in VR!

#19
Posted 09/22/2015 11:46 PM   
You will probably want that correction applied a little further up where vPos is calculated, like: [code] ///////////////////////////////// // Get postion float fDepth = vNormalDepthVal.w; vec3 vPos = GetPos(px_vPosition.xy, fDepth); // View-space stereo correction: vPos.x -= g_eye * g_eye_separation * (fDepth - g_convergence) * a_mtxInvProjection[0].x; [/code]
You will probably want that correction applied a little further up where vPos is calculated, like:
/////////////////////////////////
// Get postion
float fDepth = vNormalDepthVal.w;
vec3 vPos = GetPos(px_vPosition.xy, fDepth);

// View-space stereo correction:
vPos.x -= g_eye * g_eye_separation * (fDepth - g_convergence) * a_mtxInvProjection[0].x;

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

#20
Posted 09/23/2015 12:29 AM   
[quote="DarkStarSword"]You will probably want that correction applied a little further up where vPos is calculated, like: [code] ///////////////////////////////// // Get postion float fDepth = vNormalDepthVal.w; vec3 vPos = GetPos(px_vPosition.xy, fDepth); // View-space stereo correction: vPos.x -= g_eye * g_eye_separation * (fDepth - g_convergence) * a_mtxInvProjection[0].x; [/code][/quote] Thx for that info;)) I also noticed that if I apply it directly in the function I get better results;) Didn't actually notice the function before now:)) [code] vec3 GetPos(in vec2 avUV, float afDepth) { // Helifax stereoScreenPos = avScreenToFarPlane; stereoScreenPos.x += g_eye * g_eye_separation * (stereoScreenPos.w - g_convergence) * 0.0003 * a_mtxInvProjection[0].x; return vec3(avUV.xy * stereoScreenPos.xy + stereoScreenPos.zw, -afFarPlane) * afDepth; } [/code] (Still hacking around a bit;))) Thx for the reply:)
DarkStarSword said:You will probably want that correction applied a little further up where vPos is calculated, like:
/////////////////////////////////
// Get postion
float fDepth = vNormalDepthVal.w;
vec3 vPos = GetPos(px_vPosition.xy, fDepth);

// View-space stereo correction:
vPos.x -= g_eye * g_eye_separation * (fDepth - g_convergence) * a_mtxInvProjection[0].x;


Thx for that info;))

I also noticed that if I apply it directly in the function I get better results;) Didn't actually notice the function before now:))
vec3 GetPos(in vec2 avUV, float afDepth)

{
// Helifax
stereoScreenPos = avScreenToFarPlane;
stereoScreenPos.x += g_eye * g_eye_separation * (stereoScreenPos.w - g_convergence) * 0.0003 * a_mtxInvProjection[0].x;

return vec3(avUV.xy * stereoScreenPos.xy + stereoScreenPos.zw, -afFarPlane) * afDepth;

}

(Still hacking around a bit;)))

Thx for the reply:)

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


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

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

#21
Posted 09/23/2015 12:33 AM   
Just q quick update: I managed to get some of the shadows to work correctly last night. More shadow shaders still need correcting though, as long as reflection/refraction and other shaders. Still, a lot of work is still required in other areas as a lot of other things are broken :)
Just q quick update:

I managed to get some of the shadows to work correctly last night. More shadow shaders still need correcting though, as long as reflection/refraction and other shaders.
Still, a lot of work is still required in other areas as a lot of other things are broken :)

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


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

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

#22
Posted 09/23/2015 09:12 AM   
Will it have eye-sync issue like other OpenGl titles?
Will it have eye-sync issue like other OpenGl titles?

Intel i7 8086K
Gigabyte GTX 1080Ti Aorus Extreme
DDR4 2x8gb 3200mhz Cl14
TV LG OLED65E6V
Windows 10 64bits

#23
Posted 09/23/2015 10:36 AM   
How's the game? I've been a fan of Frictional for a long time, especially since they released their Penumbra games for Linux many years before Humble made it popular, but I lost some confidence in them after Machine for Pigs - of course I realise that was The Chinese Room, but Frictional still signed off on it...
How's the game? I've been a fan of Frictional for a long time, especially since they released their Penumbra games for Linux many years before Humble made it popular, but I lost some confidence in them after Machine for Pigs - of course I realise that was The Chinese Room, but Frictional still signed off on it...

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

#24
Posted 09/23/2015 11:13 AM   
[quote="DarkStarSword"]How's the game? I've been a fan of Frictional for a long time, especially since they released their Penumbra games for Linux many years before Humble made it popular, but I lost some confidence in them after Machine for Pigs - of course I realise that was The Chinese Room, but Frictional still signed off on it...[/quote] I can't really say. I am still stuck in the 1st room:) where I want to clean& fix up everything. From what I understand so far it's an awesome game. Is pretty close to penumbra. Some say the story is awesome, other say the gameplay is not scary enough. So, I don't really know as I haven't actually played it...yet. [quote="joker18"]Will it have eye-sync issue like other OpenGl titles?[/quote] What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)
DarkStarSword said:How's the game? I've been a fan of Frictional for a long time, especially since they released their Penumbra games for Linux many years before Humble made it popular, but I lost some confidence in them after Machine for Pigs - of course I realise that was The Chinese Room, but Frictional still signed off on it...


I can't really say. I am still stuck in the 1st room:) where I want to clean& fix up everything.
From what I understand so far it's an awesome game. Is pretty close to penumbra. Some say the story is awesome, other say the gameplay is not scary enough. So, I don't really know as I haven't actually played it...yet.

joker18 said:Will it have eye-sync issue like other OpenGl titles?

What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)

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


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

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

#25
Posted 09/23/2015 11:20 AM   
I played about the 1st 15 min last night. 3D will really add a lot to this game. I'm looking forward to it. Thanks again Helifax....
I played about the 1st 15 min last night. 3D will really add a lot to this game. I'm looking forward to it. Thanks again Helifax....

Asus VG248QE 24-Inch LED-Lit Monitor X3
WASABI MANGO UHD400 REAL 4K X1
Titan X X2
Corsair RM Series 850 Watt
Asus Sabertooth Z87 LGA 1150 Motherboard
Corsair Vengeance 16GB (2x8GB) DDR3 1600 MHz
Noctua 6 Dual Heatpipe
Windows 10 Home
Intel Core i7-4770K Quad-Core Desktop Processor 3.5 GHZ 8 MB

#26
Posted 09/23/2015 11:50 AM   
[quote="helifax"] What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)[/quote] I was thinking of Wolfenstein. So the problem with eye-sync comes from ID engine and is not related to OpenGL.
helifax said:
What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)


I was thinking of Wolfenstein. So the problem with eye-sync comes from ID engine and is not related to OpenGL.

Intel i7 8086K
Gigabyte GTX 1080Ti Aorus Extreme
DDR4 2x8gb 3200mhz Cl14
TV LG OLED65E6V
Windows 10 64bits

#27
Posted 09/23/2015 12:31 PM   
[quote="joker18"][quote="helifax"] What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)[/quote] I was thinking of Wolfenstein. So the problem with eye-sync comes from ID engine and is not related to OpenGL.[/quote] The problem in ID engine is that is capped at 60fps. 60fps/2 = 30 fps per eye => some sync issues Amnesia games have the ability to say unlimited FPS:) If your GPu is powerful enough to render constantly 120fps you get 60fps per eye => no eye-sync issue (or better said not perceivable)
joker18 said:
helifax said:
What other titles? Last I checked both Amnesia games didn't had a problem with eye-sync:)


I was thinking of Wolfenstein. So the problem with eye-sync comes from ID engine and is not related to OpenGL.

The problem in ID engine is that is capped at 60fps. 60fps/2 = 30 fps per eye => some sync issues

Amnesia games have the ability to say unlimited FPS:) If your GPu is powerful enough to render constantly 120fps you get 60fps per eye => no eye-sync issue (or better said not perceivable)

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


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

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

#28
Posted 09/23/2015 12:40 PM   
Great! It means I have to get this game.
Great! It means I have to get this game.

Intel i7 8086K
Gigabyte GTX 1080Ti Aorus Extreme
DDR4 2x8gb 3200mhz Cl14
TV LG OLED65E6V
Windows 10 64bits

#29
Posted 09/23/2015 01:32 PM   
great, it means to pause the game until you get it sortet out! :X cant wait! . . . is it done yet? :D
great, it means to pause the game until you get it sortet out! :X
cant wait!

.
.
.


is it done yet? :D

Who comes too late, was too slow!

#30
Posted 09/23/2015 04:44 PM   
  2 / 35    
Scroll To Top