Jump to content

e.fortier

Member Since 21 Dec 2012
Offline Last Active Feb 24 2017 02:19 AM

Posts I've Made

In Topic: Does the "discard" statement incur slowdown?

15 January 2017 - 04:19 PM

Many thanks for the link and information. I will read up and do tests on some different machine.

 

Much appreciated.


In Topic: Instancing worth it for rendering text in a 2D game?

23 December 2016 - 12:25 AM

 

Strangely enough, if I render 200 characters, I get the same timing, 2 to 4 microseconds. This might be an innacuracy of the highperf counter, but I'm not sure. What I know is that its fast enough for my needs.

 

Probably you are measuring CPU time (time to prepare your commands).

GPU timings are usually measured by GPU profilers such as NSight/DX GPU query/GPUView/..

 

Doh, very true! I'l give it a looksee.

 

Thanks guys. I got things working pretty fast now. If this becomes a problem, then I'll investigate.


In Topic: Instancing worth it for rendering text in a 2D game?

22 December 2016 - 12:30 AM

I just did some tests while I rewrote my text box parsing and rendering. This is on a Lenovo Ideapad Y560 laptop, which has a Radeon HD5730 video card.

 

Rendering a screen full of text at 1980x1080 (external monitor),

15750 total characters for 63000 vertices,

using a single DrawIndexed call,

with a simple pixel shader that does transparency.

 

The time to render the text varies between 2 and 4 microsecond. That is with no instancing and sending all those vertices to the gpu. I only update the buffer if the text changes in some way.

 

Strangely enough, if I render 200 characters, I get the same timing, 2 to 4 microseconds. This might be an innacuracy of the highperf counter, but I'm not sure. What I know is that its fast enough for my needs.


In Topic: Instancing worth it for rendering text in a 2D game?

20 December 2016 - 11:31 PM

A quick test to check if any optimizations are needed - just fill the whole screen with text, and see if there is a significant slowdown.

 

Great idea, I'll definitely do that. 

 

In addition to the above advice, you're almost certainly not drawing enough text for it to be a bottleneck worth addressing.

 

Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.

 

@Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.

 

Thanks guys.

 

 

In addition to the above advice, you're almost certainly not drawing enough text for it to be a bottleneck worth addressing.

 

Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.

 

@Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.

 

In addition to the above advice, you're almost certainly not drawing enough text for it to be a bottleneck worth addressing.

 

Yeah, you're probably right. Besides, rendering the text in a texture would incur the rendering cost of parsing that text only once. It's probably cheaper to then just render the text texture until it's not needed anymore. I'll check that too.

 

@Ryan_001, thanks a lot for the link to that presentation. I found the video of that presentation on the GDC website: http://www.gdcvault.com/play/1020624/Advanced-Visual-Effects-with-DirectX along with many other great ones too! Very informative.

 


In Topic: Alternatives for std::heap?

16 August 2016 - 11:58 PM

Ah, indeed!

 

Thanks to you both. "Priority queue" lead me in the right direction and I now have it working. Now to test it and continue on my merry way!

 

:D