Skip to content

Commit

Permalink
Merge pull request #2978 from MoritzBrueckner/cuda-warning
Browse files Browse the repository at this point in the history
Enable GPU for environment rendering also for non-CUDA compute devices
  • Loading branch information
luboslenco committed Dec 7, 2023
2 parents 62312c4 + b69ad3f commit 495cbb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blender/arm/write_probes.py
Expand Up @@ -68,10 +68,10 @@ def setup_envmap_render():
scene.render.resolution_y = radiance_size // 2

# Set GPU as rendering device if the user enabled it
if bpy.context.preferences.addons["cycles"].preferences.compute_device_type == "CUDA":
if bpy.context.preferences.addons["cycles"].preferences.compute_device_type != "NONE":
scene.cycles.device = "GPU"
else:
log.info('Using CPU for environment render (might be slow). Enable CUDA if possible.')
log.info('Using CPU for environment render (might be slow). If possible, configure GPU rendering in Blender preferences (System > Cycles Render Devices).')

# Those settings are sufficient for rendering only the world background
scene.cycles.samples = 1
Expand Down

0 comments on commit 495cbb3

Please sign in to comment.