<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hello everyone,</p>
<p>I originally asked the following question on the #blendercoders IRC but was advised to send it here.</p>
<p><em>Context</em>: I am currently working on a modified version of Cycles, in which the user have control over how light paths behave: they are able to transport/move rays hitting a specific surface to another one.</p>
<p>Such a modification implies that during the path tracing process, <strong>some paths/samples must be discarded</strong> (to do that I simply don't add their contribution to the final image, in kernel_path.h/kernel_path_trace()).</p>
<p>It means some pixels are downsampled since some of their samples might be discarded, however Cycles still divides for each pixel the total contribution by <em>the total number of samples</em> which is assumed to be constant over the entire image.</p>
<p>Hence my question: is there a simple way to make this last operation (averaging pixel samples) rely on a local number of samples, for each pixel, rather than a constant amount of samples for the entire image?</p>
<p>I hope this is the right place to ask such a question, and that some of you will have an answer.</p>
<p>Regards.</p>
<div>-- <br />
<p id="signature" style="font-size: smaller; color: 595959;"><span style="font-weight: bold;">Lucas Escot</span><br />L3 Informatique Fondamentale<br /><span style="font-weight: bold;">ENS de Lyon</span><br /><span>Telephone: 06 88 62 63 86</span></p>
</div>
</body></html>