Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-06-14 17:18:34 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-06-14 23:07:07 +0300
commit716e138a1b8cb81e13f7da2da5d16763d868743a (patch)
tree3aed0b6a0ab447071f9f4ba802cdc2f080b54a27 /intern/cycles/kernel/kernel_emission.h
parentfd19069999e3655206ccf21dc851801a325dea5d (diff)
Cycles: Automatically detect HDRI resolution by default and use non-square sampling map
The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution. If there are no Enviroment Textures, it just uses the old default. Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size, the manual UI option now halves the value to get the height. A default aspect ratio of 2:1 makes sense since this is what most HDRIs use. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D3477
Diffstat (limited to 'intern/cycles/kernel/kernel_emission.h')
-rw-r--r--intern/cycles/kernel/kernel_emission.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index a5556c3be8f..524e2467ebc 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -319,9 +319,9 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg,
#ifdef __BACKGROUND_MIS__
/* check if background light exists or if we should skip pdf */
- int res = kernel_data.integrator.pdf_background_res;
+ int res_x = kernel_data.integrator.pdf_background_res_x;
- if(!(state->flag & PATH_RAY_MIS_SKIP) && res) {
+ if(!(state->flag & PATH_RAY_MIS_SKIP) && res_x) {
/* multiple importance sampling, get background light pdf for ray
* direction, and compute weight with respect to BSDF pdf */
float pdf = background_light_pdf(kg, ray->P, ray->D);