[Bf-cycles] Differences between svm and osl performance relatd to texture filtering?

Brecht Van Lommel brechtvanlommel at pandora.be
Sun Jul 7 12:15:19 CEST 2013


OIIO is a lot more overhead even when using bilinear filtering, look
at TextureSystemImpl::texture_lookup and accum_sample_bilinear. Plus
it has to track texture coordinate derivatives this texture lookup in
OSL. Might be interesting to run a profiler anyway, shows you
immediately which functions are slow, can always be something
unexpected.

The more advanced texture filtering is nice if you take few AA
samples. If you take many the simple SVM filtering will converge to
the right results anyway so the extra cost isn't really worth it.
Though for bilinear I guess a lot of the overhead comes from other
features the texture lookup call provides, checking all the different
options.

On Sun, Jul 7, 2013 at 11:39 AM, Martijn Berger
<martijn.berger at gmail.com> wrote:
> I did some quick tests to empirically test the hypothesis that osl
> performance is made much worse by texture filtering or translation of
> structures.
>
> First texture filtering:
>
> I made a scene with a plane, a camera and an environment of a solid color:
>
> I added a texture and measured:
>
> svm:          OSL:        modified OSL:
>
> 0:12:40      0:27:72     0:26:60
> 0:12:40      0:27:90     0:26:75
> 0:12:40      0:28:03     0:26:53
>
> modified OSL is a one line change to force bi-linear texture interpolation:
>
> intern/cycles/kernel/osl/osl_services.cpp: ~ line 772 add:
> options.interpmode = TextureOpt::InterpBilinear;
>
> I am getting what looks like a measurable significant result but no where
> near what we need to explain performance gap.
>
> Diffuse:
>
> svm:          OSL:
> 0:09:10      0:11:25
> 0:09:10      0:11:17
> 0:09:08      0:11:17
>
> noise texture
>
> svm:          OSL:
> 0:17:02      0:23:18
> 0:16:97      0:23:00
> 0:16:98      0:22:96
>
> both of the above are in line with each other both would indicate a
> performance loss of about 25 % on using OSL for trivial shaders due to
> translation of data, OSL initialization etc.
>
> To me it seems that image textures are getting a huge hit and that the
> SmartBicubic filter is not the main problem.
>
> Hope this info helps. I am continuing the dig to find the root cause.
>
>
>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>


More information about the Bf-cycles mailing list