<div dir="ltr">On Sat, Aug 17, 2013 at 12:23 AM, Thomas Dinges <span dir="ltr">&lt;<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I checked on some implementations of the new model.<br>
* [<a href="https://github.com/githole/Skydome/blob/master/skydome.c" target="_blank">https://github.com/githole/Skydome/blob/master/skydome.c</a> Simple<br>
implementation] which calculates every pixel and outputs an image.<br>
* Mitsuba renders the Sky to an HDR map internally and uses this.<br>
<br>
So basically I would appreciate some starting points on how to approach<br>
this. Use the model data? Separate code into precalc and svm evaluation<br>
again?<br></blockquote><div><br></div><div>Looking at the code, I would do a precomputation and then implement arhosek_tristim_skymodel_radiance + ArHosekSkyModel_GetRadianceInternal in OSL and SVM. It actually looks very similar to the code we have already. The precomputed data in ArHosekTristimSkyModelState is 30 floats so that&#39;s not very big, only a tiny amount of data is extracted from those 66kb.</div>

<div><br></div><div>For SVM you can store that in the same place I guess, 30 floats isn&#39;t much more than the 20 we store there now. For OSL you can also do precomputation, knowing the OSL internals better now I don&#39;t think that it would actually be capable of doing it for this code. You can pass the precomputed data as float array parameters to the shaders.</div>

<div><br></div><div>Brecht.</div><div><br></div></div></div></div>