aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-28 02:08:11 +0100
committerSven Gothel <[email protected]>2015-03-28 02:08:11 +0100
commit450aa6f7df9e67dd256b86f94e65eaf707032aad (patch)
tree04aa207d84ddc8ca246d2573aaaf756b3ce8a0b5 /LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h
parent3c7b8a17e907f4ef2afd9f77db566a3f6179cbe4 (diff)
parent4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (diff)
Merge branch 'vanilla_0.5.0.1' into jogamp_0.5.0.1
Conflicts: LibOVR/Include/OVR_CAPI_0_5_0.h LibOVR/Src/CAPI/CAPI_HMDState.cpp LibOVR/Src/Displays/OVR_Win32_Dxgi_Display.h LibOVR/Src/Kernel/OVR_System.cpp LibOVR/Src/OVR_CAPI.cpp LibOVR/Src/OVR_Profile.cpp LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp LibOVRKernel/Src/Kernel/OVR_Types.h
Diffstat (limited to 'LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h')
-rw-r--r--LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h99
1 files changed, 0 insertions, 99 deletions
diff --git a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h
index 6f48122..7fc6b9e 100644
--- a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h
+++ b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionShaders.h
@@ -164,105 +164,6 @@ namespace OVR { namespace CAPI { namespace GL {
{
{ "Color", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 0, 16 },
};
-
-
- static const char Distortion_vs[] =
- "uniform vec2 EyeToSourceUVScale;\n"
- "uniform vec2 EyeToSourceUVOffset;\n"
-
- "_VS_IN vec2 Position;\n"
- "_VS_IN vec4 Color;\n"
- "_VS_IN vec2 TexCoord0;\n"
-
- "_VS_OUT vec4 oColor;\n"
- "_VS_OUT vec2 oTexCoord0;\n"
-
- "void main()\n"
- "{\n"
- " gl_Position.x = Position.x;\n"
- " gl_Position.y = Position.y;\n"
- " gl_Position.z = 0.5;\n"
- " gl_Position.w = 1.0;\n"
- // Vertex inputs are in TanEyeAngle space for the R,G,B channels (i.e. after chromatic aberration and distortion).
- // Scale them into the correct [0-1],[0-1] UV lookup space (depending on eye)
- " oTexCoord0 = TexCoord0 * EyeToSourceUVScale + EyeToSourceUVOffset;\n"
- " oColor = Color;\n" // Used for vignette fade.
- "}\n";
-
- const OVR::CAPI::GL::ShaderBase::Uniform Distortion_vs_refl[] =
- {
- { "EyeToSourceUVScale", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 0, 8 },
- { "EyeToSourceUVOffset", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 8, 8 },
- };
-
- static const char Distortion_fs[] =
- "uniform sampler2D Texture0;\n"
-
- "_FS_IN vec4 oColor;\n"
- "_FS_IN vec2 oTexCoord0;\n"
-
- "_FRAGCOLOR_DECLARATION\n"
-
- "void main()\n"
- "{\n"
- " _FRAGCOLOR = _TEXTURE(Texture0, oTexCoord0, 0.0);\n"
- " _FRAGCOLOR.a = 1.0;\n"
- "}\n";
-
-
- static const char DistortionTimewarp_vs[] =
- "uniform vec2 EyeToSourceUVScale;\n"
- "uniform vec2 EyeToSourceUVOffset;\n"
- "uniform mat4 EyeRotationStart;\n"
- "uniform mat4 EyeRotationEnd;\n"
-
- "_VS_IN vec2 Position;\n"
- "_VS_IN vec4 Color;\n"
- "_VS_IN vec2 TexCoord0;\n"
-
- "_VS_OUT vec4 oColor;\n"
- "_VS_OUT vec2 oTexCoord0;\n"
-
- "void main()\n"
- "{\n"
- " gl_Position.x = Position.x;\n"
- " gl_Position.y = Position.y;\n"
- " gl_Position.z = 0.0;\n"
- " gl_Position.w = 1.0;\n"
-
- // Vertex inputs are in TanEyeAngle space for the R,G,B channels (i.e. after chromatic aberration and distortion).
- // These are now "real world" vectors in direction (x,y,1) relative to the eye of the HMD.
- " vec3 TanEyeAngle = vec3 ( TexCoord0.x, TexCoord0.y, 1.0 );\n"
-
- // Accurate time warp lerp vs. faster
-#if 1
- // Apply the two 3x3 timewarp rotations to these vectors.
- " vec3 TransformedStart = (EyeRotationStart * vec4(TanEyeAngle, 0)).xyz;\n"
- " vec3 TransformedEnd = (EyeRotationEnd * vec4(TanEyeAngle, 0)).xyz;\n"
- // And blend between them.
- " vec3 Transformed = mix ( TransformedStart, TransformedEnd, Color.a );\n"
-#else
- " mat4 EyeRotation = mix ( EyeRotationStart, EyeRotationEnd, Color.a );\n"
- " vec3 Transformed = EyeRotation * TanEyeAngle;\n"
-#endif
-
- // Project them back onto the Z=1 plane of the rendered images.
- " float RecipZ = 1.0 / Transformed.z;\n"
- " vec2 Flattened = vec2 ( Transformed.x * RecipZ, Transformed.y * RecipZ );\n"
-
- // These are now still in TanEyeAngle space.
- // Scale them into the correct [0-1],[0-1] UV lookup space (depending on eye)
- " vec2 SrcCoord = Flattened * EyeToSourceUVScale + EyeToSourceUVOffset;\n"
- " oTexCoord0 = SrcCoord;\n"
- " oColor = vec4(Color.r, Color.r, Color.r, Color.r);\n" // Used for vignette fade.
- "}\n";
-
-
- const OVR::CAPI::GL::ShaderBase::Uniform DistortionTimewarp_vs_refl[] =
- {
- { "EyeToSourceUVScale", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 0, 8 },
- { "EyeToSourceUVOffset", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 8, 8 },
- };
static const char DistortionChroma_vs[] =
"uniform vec2 EyeToSourceUVScale;\n"