Author Topic: UIWrapContent for Camera?  (Read 6676 times)

markofevil3

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
UIWrapContent for Camera?
« on: July 24, 2014, 11:26:10 PM »
Will you add UIWrapContent for draggableCamera in future? ScrollView is good but performance cost is too much on lower device (using clip panel). DragCamera is better but it's hard to do the wrap content  :-\

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWrapContent for Camera?
« Reply #1 on: July 25, 2014, 02:38:09 AM »
No plans for that at this time, but have you tried simply enabling culling on the scroll view's panel?

markofevil3

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: UIWrapContent for Camera?
« Reply #2 on: July 25, 2014, 10:47:51 AM »
I tried simple test hierarchy:
-UIPanel (with scrollView, soft clip)
  - UIWrapContent
    - Row(with with only 1 UISprite)
    - Row(with with only 1 UISprite)
    - Row(with with only 1 UISprite)
    - Row(with with only 1 UISprite)
    - Row(with with only 1 UISprite)
    - Row(with with only 1 UISprite)
The framerate on iphone4(iOS 6.0) is 45fps only. If i don't use soft clip, the framerate is 60 fps. It seem too much cost for soft clip. So I just wanna try DraggableCamera instead

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWrapContent for Camera?
« Reply #3 on: July 26, 2014, 03:14:51 AM »
And if you turn off clipping on the panel, choosing "Constrain but Don't Clip"? What's the FPS then?

markofevil3

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: UIWrapContent for Camera?
« Reply #4 on: July 26, 2014, 05:02:00 AM »
It will back to 60fps then. only Soft clip reduce framerate.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWrapContent for Camera?
« Reply #5 on: July 27, 2014, 03:06:46 AM »
My guess is that the shader simply tips the balance there. It's a very simple shader, as you can see by examining it (Unlit - Transparent Colored 1). It barely does anything inside different from the non-clipped one (Unlit - Transparent Colored). It's literally a difference of a few lines of code, as well as the "Offset -1, -1" setting. I suggest playing with the changes between the two shaders if you want to pinpoint what makes it tip over the edge.