You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same material and the same setting parameters result in different display effects between perspective projection and orthographic projection.
#7832
Open
yuxinabc opened this issue
May 7, 2024
· 3 comments
⚠️Issues not using this template will be systematically closed.
Describe the bug
A clear and concise description of what the bug is.
The same material and the same setting parameters result in different display effects between perspective projection and orthographic projection.
To Reproduce
Set perspective projection:
val height = view.viewport.height
val aspect = width.toDouble() / height.toDouble()
camera.setLensProjection(
cameraFocalLength.toDouble(),
aspect,
cameraNear.toDouble(),
cameraFar.toDouble())
Set up orthographic projection:
val width = view.viewport.width
val height = view.viewport.height
val aspect = width.toDouble() / height.toDouble()
val scale = 2.0
val left = -scale * aspect
val right = scale * aspect
val bottom = -scale
val top = scale
val near = cameraNear.toDouble()
val far = cameraFar.toDouble()
camera.setProjection(
Camera.Projection.ORTHO,
left,
right,
bottom,
top,
near,
far
)
Describe the bug
A clear and concise description of what the bug is.
The same material and the same setting parameters result in different display effects between perspective projection and orthographic projection.
To Reproduce
Set perspective projection:
Set up orthographic projection:
Set material parameters:
material.mat:
Expected behavior
The display effect of orthogonal projection is the same as that of perspective projection.
Screenshots
perspective_projection.mp4
orthographic_projection.mp4
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: