Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 Aug 2010
Offline Last Active Apr 16 2016 09:35 AM

Posts I've Made

In Topic: Performance on Android

16 April 2016 - 09:35 AM

The Samsung Galaxy Tab A seems to have a Qualcomm Adreno 306 GPU. In my experience, pixel fillrate is often the limiting factor, which according to https://gfxbench.com/device.jsp?D=Qualcomm+msm8916_32+%28Adreno+306%2C+development+board%29 is about 458 Mtexels/s or roughly 7.6 Mtexels per frame so it should be possible to touch each pixel about 9 times per frame with a simple fragment shader that does a texture lookup at a resolution of 1024x768 while running at 60 fps. But those are just theoretical numbers, so better benchmark it yourself to make sure they aren't off by too much.

In Topic: What is more expensive in float?

16 April 2016 - 09:23 AM

(I am assuming you mean trigonometric functions instead of goniometric functions)


Anyway, the correct answer is: Profile your code and test it yourself. My guess would be that the square root and one trigonometric function might be slightly faster, but I don't know which CPU you are using, so YMMV.


<insert obligatory rant about premature optimization here, blablabla>

In Topic: Local hash

23 March 2016 - 04:18 AM




Links are already dead and this post is just 2 days old.

In Topic: Rendering Sub-pixel Positioned Glyphs

19 March 2016 - 10:15 AM

Font files often contain hand-drawn bitmap characters for small font sizes and vector characters for big font sizes. Libraries like FreeType will give you integer offsets and kerning values for those.

Having multiple sizes of a font in a texture atlas will make it a little bit bigger, especially for huge fonts, which can be drawn with signed distance fields instead: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

In Topic: How fast is hardware-accelerated ray-tracing these days?

25 February 2016 - 05:45 AM

I wrote a raytracer for a signed distance field of size 256x256x256 in CUDA that could run with 15-60 fps at a resolution of 1920x1080 on a Nvidia Geforce 840M (similar to a Geforce 8800 GTX in floating point performance) with raytraced shadow for one light source and simple phong shading.

Terrain could be modified with union/intersect/difference operations in realtime.

I used texture memory for that because this way I could use the GPU interpolation units for neighboring distance field voxels which resulted in smooth terrain and way more than 5 fps.

So maybe in a few years fast GPUs will be common enough to render worlds this way, but for now I'd raytrace different data structures.