MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / readCenterDepth

Method readCenterDepth

src/main/java/net/optifine/shaders/Shaders.java:5236–5247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5234 }
5235
5236 public static void readCenterDepth()
5237 {
5238 if (!isShadowPass && centerDepthSmoothEnabled)
5239 {
5240 tempDirectFloatBuffer.clear();
5241 GL11.glReadPixels(renderWidth / 2, renderHeight / 2, 1, 1, GL11.GL_DEPTH_COMPONENT, GL11.GL_FLOAT, (FloatBuffer)tempDirectFloatBuffer);
5242 centerDepth = tempDirectFloatBuffer.get(0);
5243 float f = (float)diffSystemTime * 0.01F;
5244 float f1 = (float)Math.exp(Math.log(0.5D) * (double)f / (double)centerDepthSmoothHalflife);
5245 centerDepthSmooth = centerDepthSmooth * f1 + centerDepth * (1.0F - f1);
5246 }
5247 }
5248
5249 public static void beginWeather()
5250 {

Callers 2

renderHand0Method · 0.95
renderHand1Method · 0.95

Calls 3

clearMethod · 0.65
getMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected