提交 a330c23b 编写于 作者: B Ben Houston (Clara.io) 提交者: Mr.doob

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

上级 fec555a6
......@@ -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() {
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册