orillusion icon indicating copy to clipboard operation
orillusion copied to clipboard

[BUG]: 近截面bug

Open GGBond-GIS opened this issue 1 year ago • 4 comments

Bug描述

近截面我设置的0.1,不应该这么快就把物体截掉了 image

GGBond-GIS avatar Aug 15 '23 10:08 GGBond-GIS

image

GGBond-GIS avatar Aug 15 '23 10:08 GGBond-GIS

` fn applyLogarithmicDepth( clipPosition: vec4, logarithmicDepthConstant: f32, perspectiveFarPlaneDistance: f32) -> vec4 { let z = ((2.0 * log((logarithmicDepthConstant * clipPosition.z) + 1.0) / log((logarithmicDepthConstant * perspectiveFarPlaneDistance) + 1.0)) - 1.0) * clipPosition.w;

           return vec4<f32>(clipPosition.x,clipPosition.y,z,clipPosition.w);
       }`

顶点shader过了一遍这个就会出现这种情况clipPosition是member,logarithmicDepthConstant传的near,perspectiveFarPlaneDistance传入的far

GGBond-GIS avatar Aug 16 '23 09:08 GGBond-GIS

应该还是截面深度不够导致的

GGBond-GIS avatar Aug 16 '23 09:08 GGBond-GIS

具体问题还是没有对数深度缓冲区导致的

GGBond-GIS avatar Aug 16 '23 09:08 GGBond-GIS