Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Need some help optimizing rendering speed.  (Read 5980 times)

0 Members and 1 Guest are viewing this topic.

Voroz

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Need some help optimizing rendering speed.
« Reply #15 on: October 14, 2015, 11:44:58 pm »
well i just did a simple loop for testing:

//Lights
ls.SetView(lightView);
if (counttest == 4){
    counttest = 0;
    ls.RenderLights();
}
counttest += 1;

ls.RenderLightTexture();

I don't think i can post pictures of it blinking, but the entire area that's supposed to be dark goes normal bright color and then back to dark etc.

edit: not a loop, i mean a counter. Tired
« Last Edit: October 14, 2015, 11:47:16 pm by Voroz »

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Need some help optimizing rendering speed.
« Reply #16 on: October 14, 2015, 11:51:04 pm »
You are here asking for performance solutions, i give you one.
True, but i was actually mostly looking to optimize the rendering part without making the rendering slower..

I could easily make the app run in 5000 fps but only render 1 time per second, but i don't think that would be better. It's kind of the same thing here but only with the lights. It would be a good solution though ofcourse as a lower graphics option.

The things that i do for better rendering is:

Use few textures as posible.
Use vertex array when posible.
Don't create/destroy sprite if not needed.

Is few we can do i we are used to code well.
You can use directly OpenGL to make ultra minimal performances ajust but as you say if you are getting in your final release 220 fps in promedium and you will set the limit to 60 there is no need to make more optimizations.
I would like a spanish/latin community...
Problems building for Android? Look here

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Need some help optimizing rendering speed.
« Reply #17 on: October 14, 2015, 11:56:29 pm »
well i just did a simple loop for testing:

//Lights
ls.SetView(lightView);
if (counttest == 4){
    counttest = 0;
    ls.RenderLights();
}
counttest += 1;

ls.RenderLightTexture();

I don't think i can post pictures of it blinking, but the entire area that's supposed to be dark goes normal bright color and then back to dark etc.

edit: not a loop, i mean a counter. Tired


I don't know what cause you the blinking with "my system".

I note that if a use the light system with a random vertex array they make a bad mix. But it only was a crazy thing that i do and i test it so few. Just saying.
I would like a spanish/latin community...
Problems building for Android? Look here

Voroz

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Need some help optimizing rendering speed.
« Reply #18 on: October 15, 2015, 12:04:12 am »
well i connect the hulls that block light of LTBL with Box2d. I don't know if it'd act different when using shadows cast by hulls though. Anyway i need to get some sleep now. Have a good night!

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Need some help optimizing rendering speed.
« Reply #19 on: October 15, 2015, 12:11:37 am »
I havenĀ“t tested with box2D.

But all my test are with more than one hull and more than 3 vertices per hull.

Good night too!
I would like a spanish/latin community...
Problems building for Android? Look here

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: Need some help optimizing rendering speed.
« Reply #20 on: October 17, 2015, 08:11:13 am »
Make something that will adjust draw calls less draw calls - lesss calls to OpenGL - better perfomance. ;)