To download the mod, Look here! Thank you StellaArtois and mabrowning!
Click here to visit the Minecrift Site!
Looking for a server with other Rift users? Join us at MetaCraft!

One of the things I've really been looking forward to playing on the rift is Minecraft, because I can't think of anything more relaxing than building a house, and feeling the sheer scale of the whole thing.
This has been looking less and less likely in the immediate future, due to all of the main driver based solutions being DirectX based, whereas Minecraft is OpenGL.
Then, as I was messing around with mods, I had an idea. Minecraft has had a GLSL shader mod for years, and I wondered whether or not it would be possible to implement the Oculus warp through that. Unfortunately, I have absolutely no knowledge of GLSL, but I thought it might be possible.
After doing a bit of digging (lol), I came across this thread: http://www.mtbs3d.com/phpbb/viewtopic.php?f=140&t=17081 from two days ago. This seems to be a GLSL warp shader, but its for BGE. I spent about half an hour trying to get it to work inside Minecraft (Which uses GLSL 120 if I'm not mistaken) but I then realised I had absolutely no idea what I was doing, and that it would probably be a heck of a lot easier simply asking someone who had a bit more of a clue than I did.
My knowledge is limited - but am I right in thinking that in the driver based solutions that exist for Non-Rift ready games, the "Head tilt" (Roll?) axis of motion with the rift is generally done by the shader, and then the standard x and y done by overtaking the mouse? If that's the case, is the roll possible to implement with GLSL, and is it a feasible possibility to implement a Minecraft Rift mod using this? (And some sort of side program to bind rift X and Y tracking to mouse movement?) My knowledge at present is limited, but I am trying to learn.
If I'm wrong about the x and y axis, my entire understanding is based on how Viero handles Skyrim in that if you plug in a controller, they no longer work due to mouse being disabled completely when the game detects a controller.
If this is possible, I will be even more excited for my Dev kit arriving that I could possibly imagine. I've had a search around, but I cannot find any sort of attempt at Rift implementation in Minecraft, only people talking about how awesome it would be. I thought I'd see if I could get something going myself, but my knowledge is just too limited to really get any sort of headway.
Thanks!
If anyone is interested in this, here are the links for the two mods you would need to get GLSL working in Minecraft;
http://www.minecraftforum.net/topic/154 ... -karyonix/
http://optifine.net/home.php
And the spesific downloads that work with the latest MC version (1.5.1);
http://optifine.net/adloadx.php?f=OptiF ... D_U_B3.zip
http://www.mediafire.com/?c0q1dq5ve4hhlkd
(To install those, delete META-INF, Install Optifine First and GLSL Second, shaders go in the shaders folder and are enabled in a menu inside Minecraft itsself)
This was the shader from the other thread;
Code: Select all
#version 120
uniform sampler2D bgl_RenderTexture;
const vec2 LeftLensCenter = vec2(0.2863248, 0.5);
const vec2 RightLensCenter = vec2(0.7136753, 0.5);
const vec2 LeftScreenCenter = vec2(0.25, 0.5);
const vec2 RightScreenCenter = vec2(0.75, 0.5);
const vec2 Scale = vec2(0.1469278, 0.2350845);
const vec2 ScaleIn = vec2(4, 2.5);
const vec4 HmdWarpParam = vec4(1, 0.22, 0.24, 0);
// Scales input texture coordinates for distortion.
vec2 HmdWarp(vec2 in01, vec2 LensCenter)
{
vec2 theta = (in01 - LensCenter) * ScaleIn; // Scales to [-1, 1]
float rSq = theta.x * theta.x + theta.y * theta.y;
vec2 rvector = theta * (HmdWarpParam.x + HmdWarpParam.y * rSq +
HmdWarpParam.z * rSq * rSq +
HmdWarpParam.w * rSq * rSq * rSq);
return LensCenter + Scale * rvector;
}
void main()
{
// The following two variables need to be set per eye
vec2 LensCenter = gl_FragCoord.x < 640 ? LeftLensCenter : RightLensCenter;
vec2 ScreenCenter = gl_FragCoord.x < 640 ? LeftScreenCenter : RightScreenCenter;
vec2 oTexCoord = gl_TexCoord[0].xy;
//vec2 oTexCoord = (gl_FragCoord.xy + vec2(0.5, 0.5)) / vec2(1280, 800); //Uncomment if using BGE's built-in stereo rendering
vec2 tc = HmdWarp(oTexCoord, LensCenter);
if (any(bvec2(clamp(tc,ScreenCenter-vec2(0.25,0.5), ScreenCenter+vec2(0.25,0.5)) - tc)))
{
gl_FragColor = vec4(vec3(0.0), 1.0);
return;
}
//tc.x = gl_FragCoord.x < 640 ? (2.0 * tc.x) : (2.0 * (tc.x - 0.5)); //Uncomment if using BGE's built-in stereo rendering
gl_FragColor = texture2D(bgl_RenderTexture, tc);
}