Files
AnyImage/tests/support/hdr_image.py
nan 489003c2cc Add new tests and functionality for image processing and geometry handling
- Introduced color_image.py for preparing standalone color images for tests.
- Added hdr_image.py to create HDR textures for testing.
- Implemented test_image_depth_panorama.py to evaluate panorama topology, UVs, and depth discontinuities.
- Created test_shadeless.py to validate the opacity and HDR color endpoints of the Shadeless group.
- Developed moge3_export.py for exporting dynamic MoGe-3 backbone and ONNX graphs.
- Added material.py to inherit material slots onto generated geometry.
- Built image_depth_panorama.py to construct a quad panorama with depth separation and sampling.
2026-09-10 14:42:17 +08:00

16 lines
453 B
Python

import bpy
import numpy as np
import pytest
@pytest.fixture
def hdr_texture(texture):
image = bpy.data.images.new("HDR source", width=4, height=3, alpha=True, float_buffer=True)
image.alpha_mode = "PREMUL"
rgba = np.tile([4.0, 2.0, -0.25, 0.5], (3, 4, 1)).astype(np.float32)
rgba[0, 0] = [9, 3, -0.5, 0]
rgba[2, 3] = [25, 12, 6, 1]
image.pixels.foreach_set(np.flipud(rgba).ravel())
texture.image = image
return texture