From a330c23b17dbd2e7a9bc36a161d45c0c49b7ed4b Mon Sep 17 00:00:00 2001 From: "Ben Houston (Clara.io)" Date: Fri, 27 May 2016 15:42:40 -0400 Subject: [PATCH] make names consistent: orthographic and perspective rather than ortho and perspective (#9022) --- examples/webgl_depth_texture.html | 2 +- src/renderers/shaders/ShaderChunk/packing.glsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/webgl_depth_texture.html b/examples/webgl_depth_texture.html index 341dd5d4c6..de519738d4 100644 --- a/examples/webgl_depth_texture.html +++ b/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() { diff --git a/src/renderers/shaders/ShaderChunk/packing.glsl b/src/renderers/shaders/ShaderChunk/packing.glsl index 0de12b4f62..e701776a7b 100644 --- a/src/renderers/shaders/ShaderChunk/packing.glsl +++ b/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; } -- GitLab