浏览代码

make names consistent: orthographic and perspective rather than ortho and perspective (#9022)

Ben Houston (Clara.io) 9 年之前
父节点
当前提交
a330c23b17
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      examples/webgl_depth_texture.html
  2. 2 2
      src/renderers/shaders/ShaderChunk/packing.glsl

+ 1 - 1
examples/webgl_depth_texture.html

@@ -67,7 +67,7 @@
       float readDepth (sampler2D depthSampler, vec2 coord) {
         float fragCoordZ = texture2D(depthSampler, coord).x;
         float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );
-        return viewZToOrthoDepth( viewZ, cameraNear, cameraFar );
+        return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );
       }
 
       void main() {

+ 2 - 2
src/renderers/shaders/ShaderChunk/packing.glsl

@@ -30,10 +30,10 @@ float unpackRGBAToDepth( const in vec4 v ) {
 
 // NOTE: viewZ/eyeZ is < 0 when in front of the camera per OpenGL conventions
 
-float viewZToOrthoDepth( const in float viewZ, const in float near, const in float far ) {
+float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
   return ( viewZ + near ) / ( near - far );
 }
-float OrthoDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
+float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
   return linearClipZ * ( near - far ) - near;
 }