Skip to content

Commit 4c50887

Browse files
committed
v33
1 parent 25a6632 commit 4c50887

18 files changed

+1528
-531
lines changed

minecriftversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
of_json_name = "1.7.10_HD_U_D1"
55
of_file_md5 = "57c724fe8335c82aef8d54c101043e60"
66
minecrift_version_num = "1.7.10"
7-
minecrift_build = "Vivecraft-jrbudda32"
7+
minecrift_build = "Vivecraft-jrbudda33"
88
of_file_extension = ".jar"
99
mcp_version = "mcp908"
1010
mcp_uses_generics = False

patches/net/minecraft/client/Minecraft.java.patch

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
import net.minecraft.world.EnumDifficulty;
154154
import net.minecraft.world.WorldProviderEnd;
155155
import net.minecraft.world.WorldProviderHell;
156-
@@ -150,2988 +224,4801 @@
156+
@@ -150,2988 +224,4838 @@
157157
import net.minecraft.world.storage.ISaveFormat;
158158
import net.minecraft.world.storage.ISaveHandler;
159159
import net.minecraft.world.storage.WorldInfo;
@@ -1941,6 +1941,10 @@
19411941
+ public int _DepthMask_viewMatrix = -1;
19421942
+ public int _DepthMask_passUniform = -1;
19431943
+ public int _DepthMask_keyColorUniform = -1;
1944+
+ public int _FOVReduction_RadiusUniform = -1;
1945+
+ public int _FOVReduction_BorderUniform = -1;
1946+
+ public int _FOVReduction_TextureUniform= -1;
1947+
+ public int _FOVReduction_shaderProgramId = -1;
19441948
+ private FloatBuffer matrixBuffer = GLAllocation.createDirectFloatBuffer(16);
19451949
+ private Framebuffer mirrorFB = null;
19461950
+ private Framebuffer fsaaFirstPassResultFBO;
@@ -1983,7 +1987,7 @@
19831987
+ * The minecriftVerString will be automatically updated by the build scripts, do not modify here.
19841988
+ * Modify minecriftversion.py in root minecrift dir.
19851989
+ */
1986-
+ public final String minecriftVerString = "Vivecraft 1.7.10 Vivecraft-jrbudda32";
1990+
+ public final String minecriftVerString = "Vivecraft 1.7.10 Vivecraft-jrbudda33";
19871991
+ /* end version */
19881992
+ /** END MINECRIFT */
19891993
+
@@ -3071,7 +3075,11 @@
30713075
+ mcProfiler.endSection();
30723076
+
30733077
+ mcProfiler.startSection("Display/Reproject");
3078+
+ try {
30743079
+ this.stereoProvider.endFrame();
3080+
+ } catch (Exception e) {
3081+
+ logger.error(e);
3082+
+ }
30753083
+ mcProfiler.endSection();
30763084
+
30773085
+ ////END MAIN VIVECRAFT RENDERING
@@ -3180,8 +3188,24 @@
31803188
+ framebufferEye0.bindFramebuffer(true); //draw to L eye tex
31813189
+ else
31823190
+ framebufferEye1.bindFramebuffer(true); //draw to R eye tex
3183-
+ framebuffer.framebufferRender(framebufferEye0.framebufferWidth, framebufferEye0.framebufferHeight);
3184-
+ }
3191+
+ if(vrSettings.useFOVReduction && vrSettings.vrFreeMove){
3192+
+ if( thePlayer !=null && (Math.abs(thePlayer.moveForward) > 0 || Math.abs(thePlayer.moveStrafing) > 0)) {
3193+
+ fov -=0.05;
3194+
+ if(fov < 0.22) fov = 0.22f;
3195+
+ } else {
3196+
+ fov +=0.01;
3197+
+ if(fov > 0.8) fov = 0.8f;
3198+
+ }
3199+
+ ARBShaderObjects.glUseProgramObjectARB(_FOVReduction_shaderProgramId);
3200+
+ ARBShaderObjects.glUniform1fARB(_FOVReduction_RadiusUniform, fov);
3201+
+ ARBShaderObjects.glUniform1iARB(_FOVReduction_TextureUniform, 0);
3202+
+ ARBShaderObjects.glUniform1fARB(_FOVReduction_BorderUniform, 0.06f);
3203+
+ framebuffer.framebufferRender(framebufferEye0.framebufferWidth, framebufferEye0.framebufferHeight);
3204+
+ ARBShaderObjects.glUseProgramObjectARB(0);
3205+
+ }
3206+
+ else{
3207+
+ framebuffer.framebufferRender(framebufferEye0.framebufferWidth, framebufferEye0.framebufferHeight);
3208+
+ } }
31853209
+ this.mcProfiler.endSection();
31863210
+
31873211
+ //this.mcProfiler.startSection("OpenGL Finish");
@@ -3192,7 +3216,12 @@
31923216
+ if(this.stereoProvider.isStereo())
31933217
+ this.stereoProvider.endFrame(this.currentPass);
31943218
+ else
3195-
+ this.stereoProvider.endFrame();
3219+
+ try {
3220+
+ this.stereoProvider.endFrame();
3221+
+ } catch (RenderConfigException e) {
3222+
+ // TODO Auto-generated catch block
3223+
+ e.printStackTrace();
3224+
+ }
31963225
+ this.mcProfiler.endSection();
31973226
+ }
31983227
+
@@ -3206,6 +3235,8 @@
32063235
+ return shouldupdate;
32073236
+ }
32083237
+
3238+
+ private float fov;
3239+
+
32093240
+ /**
32103241
+ * Called to ensure everything gets drawn right when window size is changed
32113242
+ */
@@ -7155,6 +7186,20 @@
71557186
+ _DepthMask_passUniform = ARBShaderObjects.glGetUniformLocationARB(_DepthMask_shaderProgramId, "pass");
71567187
+ _DepthMask_keyColorUniform = ARBShaderObjects.glGetUniformLocationARB(_DepthMask_shaderProgramId, "keyColor");
71577188
+
7189+
+
7190+
+ _FOVReduction_shaderProgramId = ShaderHelper.initShaders(VRShaders.FOV_REDUCTION_VERTEX_SHADER, VRShaders.FOV_REDUCTION_FRAGMENT_SHADER, true);
7191+
+ if (_FOVReduction_shaderProgramId == 0) {
7192+
+ throw new Exception("Failed to validate FOV shader!");
7193+
+ }
7194+
+
7195+
+ ShaderHelper.checkGLError("@1");
7196+
+
7197+
+ // Setup uniform IDs
7198+
+ _FOVReduction_RadiusUniform = ARBShaderObjects.glGetUniformLocationARB(_FOVReduction_shaderProgramId, "circle_radius");
7199+
+ _FOVReduction_BorderUniform = ARBShaderObjects.glGetUniformLocationARB(_FOVReduction_shaderProgramId, "border");
7200+
+ _FOVReduction_TextureUniform = ARBShaderObjects.glGetUniformLocationARB(_FOVReduction_shaderProgramId, "tex0");
7201+
+
7202+
+ ShaderHelper.checkGLError("FBO init FOV shader");
71587203
+ checkGLError("post select");
71597204
+ entityRenderer.setupClipPlanes();
71607205
+
@@ -7470,14 +7515,6 @@
74707515
+ }
74717516
+ }
74727517
+
7473-
+ public boolean endFrame()
7474-
+ {
7475-
+ if (this.stereoProvider != null)
7476-
+ this.stereoProvider.endFrame();
7477-
+
7478-
+ return true;
7479-
+ }
7480-
+
74817518
+ public double getCurrentTimeSecs()
74827519
+ {
74837520
+ return this.stereoProvider.getCurrentTimeSecs();

0 commit comments

Comments
 (0)