com.jme3.renderer.Renderer.setDepthRange()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(152)

本文整理了Java中com.jme3.renderer.Renderer.setDepthRange方法的一些代码示例,展示了Renderer.setDepthRange的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Renderer.setDepthRange方法的具体详情如下:
包路径:com.jme3.renderer.Renderer
类名称:Renderer
方法名:setDepthRange

Renderer.setDepthRange介绍

[英]Set the range of the depth values for objects. All rendered objects will have their depth clamped to this range.
[中]设置对象深度值的范围。所有渲染对象的深度都将限制在此范围内。

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void postQueue(RenderQueue rq) {
  //we need special treatement for the sky because it must not be clipped
  rm.getRenderer().setFrameBuffer(reflectionBuffer);
  reflectionCam.setProjectionMatrix(null);
  rm.setCamera(reflectionCam, false);
  rm.getRenderer().clearBuffers(true, true, true);
  //Rendering the sky whithout clipping
  rm.getRenderer().setDepthRange(1, 1);
  vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true);
  rm.getRenderer().setDepthRange(0, 1);
  //setting the clip plane to the cam
  reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1
  rm.setCamera(reflectionCam, false);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

renderer.setDepthRange(1, 1);
rq.renderQueue(Bucket.Sky, this, cam, flush);
depthRangeChanged = true;
if (prof!=null) prof.vpStep(VpStep.RenderBucket, vp, Bucket.Transparent);
if (depthRangeChanged) {
  renderer.setDepthRange(0, 1);
  depthRangeChanged = false;
renderer.setDepthRange(0, 0);
setCamera(cam, true);
rq.renderQueue(Bucket.Gui, this, cam, flush);
renderer.setDepthRange(0, 1);

代码示例来源:origin: info.projectkyoto/mms-engine

renderer.setDepthRange(1, 1);
rq.renderQueue(Bucket.Sky, this, cam, flush);
depthRangeChanged = true;
  renderer.setDepthRange(0, 1);
  depthRangeChanged = false;
renderer.setDepthRange(0, 0);
setCamera(cam, true);
rq.renderQueue(Bucket.Gui, this, cam, flush);
renderer.setDepthRange(0, 1);

代码示例来源:origin: org.jmonkeyengine/jme3-effects

public void postQueue(RenderQueue rq) {
  //we need special treatement for the sky because it must not be clipped
  rm.getRenderer().setFrameBuffer(reflectionBuffer);
  reflectionCam.setProjectionMatrix(null);
  rm.setCamera(reflectionCam, false);
  rm.getRenderer().clearBuffers(true, true, true);
  //Rendering the sky whithout clipping
  rm.getRenderer().setDepthRange(1, 1);
  vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true);
  rm.getRenderer().setDepthRange(0, 1);
  //setting the clip plane to the cam
  reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1
  rm.setCamera(reflectionCam, false);
}

代码示例来源:origin: info.projectkyoto/mms-engine

public void postQueue(RenderQueue rq) {
  //we need special treatement for the sky because it must not be clipped
  rm.getRenderer().setFrameBuffer(reflectionBuffer);
  reflectionCam.setProjectionMatrix(null);
  rm.setCamera(reflectionCam, false);
  rm.getRenderer().clearBuffers(true, true, true);
  //Rendering the sky whithout clipping
  rm.getRenderer().setDepthRange(1, 1);
  vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true);
  rm.getRenderer().setDepthRange(0, 1);
  //setting the clip plane to the cam
  reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1
  rm.setCamera(reflectionCam, false);
}

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-effects

public void postQueue(RenderQueue rq) {
  //we need special treatement for the sky because it must not be clipped
  rm.getRenderer().setFrameBuffer(reflectionBuffer);
  reflectionCam.setProjectionMatrix(null);
  rm.setCamera(reflectionCam, false);
  rm.getRenderer().clearBuffers(true, true, true);
  //Rendering the sky whithout clipping
  rm.getRenderer().setDepthRange(1, 1);
  vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true);
  rm.getRenderer().setDepthRange(0, 1);
  //setting the clip plane to the cam
  reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1
  rm.setCamera(reflectionCam, false);
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

renderer.setDepthRange(1, 1);
rq.renderQueue(Bucket.Sky, this, cam, flush);
depthRangeChanged = true;
if (prof!=null) prof.vpStep(VpStep.RenderBucket, vp, Bucket.Transparent);
if (depthRangeChanged) {
  renderer.setDepthRange(0, 1);
  depthRangeChanged = false;
renderer.setDepthRange(0, 0);
setCamera(cam, true);
rq.renderQueue(Bucket.Gui, this, cam, flush);
renderer.setDepthRange(0, 1);

相关文章