RectLight: textured light under a non-uniform scale samples and looks up the texture with the unscaled size
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- computer-graphics
Hướng nghiên cứu
Read lib/rendering/pbr/light/RectLight.cc and Light.cc, especially RectLight::update(), updateParamAndTransforms(), and updateTransforms(). Reproduce the mismatch with a textured RectLight scaled by (2, 1, 1) and compare light-only with BSDF-only sampling. Done means both sampling paths agree for the scaled textured light, as they do for the unscaled equivalent.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary. A textured RectLight whose node_xform scales it non-uniformly samples and looks up its texture with the unscaled size: light sampling and BSDF sampling disagree. Without the texture, or without the scale, both agree. Version 2026.29.1, scalar mode.
Reproduce. Diffuse floor, RectLight with width 1, height 1, a texture, scale(2, 1, 1) in node_xform, max_depth 1:
| light | light_samples only |
bsdf_samples only |
|---|---|---|
| width 1, scale(2, 1, 1), textured | 0.0907 | 0.0715 |
| width 2, no scale, textured | 0.0892 | 0.0891 |
Cause. RectLight::update() (lib/rendering/pbr/light/RectLight.cc) sets mHalfWidth/mHalfHeight from the attributes and passes them by value to updateParamAndTransforms() (Light.cc). That function first calls updateTransforms(), which for a non-uniform scale multiplies mWidth/mHeight (and mHalfWidth/mHalfHeight) by the scale, and then builds the texture uv mapping (getScaleOffset) from the stale, unscaled values it was given. So sample() maps uv in [0, 1] to the middle part of the light only, while reporting the density of the whole area, and intersect() gives uv outside [0, 1] on the outer parts.
Fix (untested). Compute the uv mapping after updateTransforms(), e.g. pass the scaled half sizes, or set the uv scale and offset from the members after the call.
- Ngôn ngữ chính
- CMake
- Star
- 4.7k
- Fork
- 321
- Merge trung bình
- 13 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenMoonRay/openmoonray
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OpenMoonRay/openmoonray#332 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
OpenMoonRay/openmoonray#320 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
OpenMoonRay/openmoonray#233 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
OpenMoonRay/openmoonray#330 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
OpenMoonRay/openmoonray#329 ·
Tất cả issue của OpenMoonRay/openmoonray
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 83/100
rive-app/rive-runtime#143 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: get_image_info returns true after copying an uninitialised buffer into the caller's output when every UDIM tile is unreadableCó thể đã có người làm @lgritz đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
AcademySoftwareFoundation/OpenImageIO#5662 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug studies ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
userFRM/egui-charts#2236 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
贡献 UGREEN 绿联 DVD+R 标定参数Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#132 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày