algorithmic modeling for Rhino

Testing correctness and performance of several GH2 classes.

12 different gradients (see bottom left for explanation) are mapped onto bitmaps in 7 different ways (see bottom right for explanation).

Gradients are drawn by directly manipulating the RGB channels of a bitmap in memory using all available processors simultaneously (each processor is assigned all pixels in a single column, then moves on to the next empty column when ready).

Performance ranges from 1~2 milliseconds for the simplest gradients to 10~15 ms for the expression based ones.

Views: 431


You need to be a member of Grasshopper to add comments!

Join Grasshopper

Comment by David Rutten on June 6, 2015 at 2:16pm

To elaborate, I'm very interested in pixel shaders as post-effects for owner drawn controls. If we end up using something like that it'll probbaly have to be implemented per platform, and they won't all look/behave the same.

That is not an option for components that draw to bitmaps, that has to work exactly the same on all platforms. We might in fact not be able to make even that much work; anti-aliasing and text rendering always use different algorithms on different platforms, so there's bound to be some discrepancies, but I'll aim to keep them as insignificant as possible.

Comment by David Rutten on June 6, 2015 at 2:12pm

This is all within the cross platform Eto drawing framework. It'll be possible (probably) to use specific Direct2D methods, but that kind of code will make the project behave differently on different platforms. That's something I wish to post-pone for as long as possible (hopefully forever).

Comment by Ángel Linares on June 6, 2015 at 1:40pm
I know that it could be too picky, but what about GLSL shaders and GPU rendering support?? "rolling_eyes_icon_here"





  • Add Photos
  • View All

© 2023   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service