Browse Source

FormulaDerivationNoteForViewZToPerspectiveDepthAndPerspectiveDepthToViewZPr (#21557)

Vis 4 năm trước cách đây
mục cha
commit
b042d3b7ff
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/renderers/shaders/ShaderChunk/packing.glsl.js

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

@@ -42,6 +42,8 @@ float orthographicDepthToViewZ( const in float linearClipZ, const in float near,
 	return linearClipZ * ( near - far ) - near;
 }
 
+// NOTE: https://twitter.com/gonnavis/status/1377183786949959682
+
 float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
 	return (( near + viewZ ) * far ) / (( far - near ) * viewZ );
 }