Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: 近截面bug #287

Open
GGBond-GIS opened this issue Aug 15, 2023 · 4 comments
Open

[BUG]: 近截面bug #287

GGBond-GIS opened this issue Aug 15, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@GGBond-GIS
Copy link

Bug描述

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

@GGBond-GIS GGBond-GIS added the bug Something isn't working label Aug 15, 2023
@GGBond-GIS
Copy link
Author

image

@GGBond-GIS GGBond-GIS changed the title [BUG]: [BUG]: 近截面bug Aug 15, 2023
@GGBond-GIS
Copy link
Author

GGBond-GIS commented Aug 16, 2023

` 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
Copy link
Author

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

@GGBond-GIS
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant