Jump to content


Member Since 19 Oct 2006
Offline Last Active Jul 13 2013 11:53 AM

Topics I've Started

opinions on buffer usage/draw calls for a scrolling album art program

05 July 2013 - 08:49 PM



I'm planning on creating a program whereby a list of album names is retrieved via http. Once the names are received, I plan to do the following:

  1. Create a static VBO, with one quad for each album name. Each quad shares part of a texture atlas, so I can use a single draw call
  2. There will be additional http requests for album art images
  3. Display a loading indicator until image arrives, then lock part of dynamic texture atlas and write image data
  4. There will be a scissor clipping rectangle that will hide the quads not yet shown
  5. User can scroll list up and down



  1. I'm using GLES, is there a better way to handle the asynchronous incoming images then to use a dynamic texture with locking overhead?
  2. Instead of one VBO for a single draw call, I could issue a separate draw call for each quad, not sure if this would be much slower? I think it would be easier because I could simply draw each quad with either album art texture or progress texture until image comes in


Thanks for any help, please see image below




DirectX SDK PRT tools, light probes

02 April 2012 - 09:19 PM

Hey all,

I'm trying to see if it's possible to use the PRT DirectX tools to setup light probes similar to this from Unity:


I notice there is a spherical light, as well as functionality to convert cubemaps to spherical harmonics coefficients. Any tips on how to be able to place light probes and create spherical harmonics coefficients from them? Thanks

SIMD neighbor search for particles?

20 January 2012 - 01:42 PM


I'm trying to use SSE to speed up neighbor finding for a particle fluid simulation. My main issue, however, is storing the neighbors of each particle in memory such that I can quickly load all candidate spacial neighbors into xmm registers to begin distance testing to see if the neighbors are within the cutoff radius.

I've tried Z-order morton sorting, but that doesn't always ensure that the spacial neighbors of a particle are stored contiguously in memory. Anyone have any ideas? Thanks

SSE insertion sort?

04 January 2012 - 08:19 PM

Hey all,

I've looked all over the Internet but can't seem to find any examples of an SSE insertion sort. Maybe it doesn't lend itself well to SIMD? Anyone know of any good resources? Thanks

[solved] SPH fluids "boiling", not colliding properly?

14 December 2011 - 09:14 PM

Hey all,

I'm seeing some strange behavior from some SPH fluid code I'm working on. I modified it to have a cylinder as a container/collision shape and that works fine. However, I then change it so that it slopes inward as it gets taller, and the particles start to move around constantly like the fluid is boiling and they never settle down. Also, the fluid level doesn't get higher as the container slopes inward as I'd expect. See image:

Attached File  fluid.gif   4.3KB   78 downloads

Here is the code I'm using to calculate positions (it's a modified form of the code at http://www.rchoetzle...hics/fluids.htm)

accel = p->sph_force;
accel *= m_Param[SPH_PMASS];
// p is the particle structure, with z being up
// radius is the particle radius
// norm is a 3-vector

   	float boundary = abs((-.4 * p->pos.z) + 9.8);

		diff = 2.0f * radius - (boundary - (float)fastSqrt_2(p->pos.x*p->pos.x + p->pos.y*p->pos.y)) * ss;

		if (((diff < 8 *radius) && (diff > EPSILON)))
			norm.Set ( -p->pos.x, -p->pos.y, 0 );
			adj = stiff * diff - damp * norm.Dot ( p->vel_eval );
			accel.x += adj * norm.x; accel.y += adj * norm.y; accel.z += adj * norm.z;


// Leapfrog Integration ----------------------------
		vnext = accel;							
		vnext *= m_DT;
		vnext += p->vel;						// v(t+1/2) = v(t-1/2) + a(t) dt
		p->vel_eval = p->vel;
		p->vel_eval += vnext;
		p->vel_eval *= 0.5;					// v(t+1) = [v(t-1/2) + v(t+1/2)] * 0.5		used to compute forces later
		p->vel = vnext;
		vnext *= m_DT/ss;
		p->pos += vnext;						// p(t+1) = p(t) + v(t+1/2) dt

I'm pretty sure the way the normal is being added to the acceleration is causing the "boiling" of the particles, but I'm not sure. Thanks for any help