Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpaqueEncounter

Member Since 02 Aug 2012
Offline Last Active Today, 04:56 PM

Topics I've Started

How is the elongated light beam/tentacle effect achieved?

09 June 2014 - 01:56 PM

Question's simple, how (what techniques or combination of techniques) are the elongated beams of light (pointed out by red arrows) in the screenshot from DOTA 2 achieved? The fire light (green arrow) is obvious, that's just a bunch of particles, but what about those dynamic (they twist and turn) beams of lights.


SpriteBatch billboards in a 3D slow on mobile device

25 May 2014 - 11:27 AM

I used this method http://blogs.msdn.com/b/shawnhar/archive/2011/01/12/spritebatch-billboards-in-a-3d-world.aspx to create a 3D billboard renderer using SpriteBatch. It works perfectly as described and on a modest desktop (with Intel HD graphics) can renderer 10,000s of billboards or particles easily.

 

On a mobile device (Windows Phone) the framerate drops sharply past a certain, not so large, point. My test (on all devices) is this:

 

- Render a primitives (sphere, cube, etc) into a render target

- Pass the render target to the method above

- Start increasing the number of billboards until the framerate drops.

 

On an x86 desktop or an ARM tablet (Surface) the framerate holds into the thousands. On the phone, it instantly drops from 60 to 30 (looks like disabling VSync has no effect on that device) as soon as you pass a certain point (~200?). The funny thing is that I can get the framerate to go up to 60 again by making the billboards half the size. Same goes when making the render target half the size.

 

Using a stopwatch, I determined that the time spent on the CPU is nowhere near the 16.67ms threshold. VS2013's frame analysis is unavailable on the Windows Phone, so that's useless.

 

Can anyone explain as to what is going on here? Is this simply the limitation of a low-power GPU (the Adreno 225 in this case)? If so, what exactly is bogging it down? The fill rate? The blending? (I tried all blend states from Opaque to NonPremultiplied, no effect on performance).


HLSL Shader Library

03 July 2013 - 02:19 PM

Is there any other hlsl shader library aside from nvidia's (http://developer.download.nvidia.com/shaderlibrary/webpages/hlsl_shaders.html) which hasn't been updated in years and seems to have been completely abandoned.

 

Isn't there anything out there that maintains the latest in hlsl shaders?


MSAA in WinRT

30 May 2013 - 03:21 PM

There's no MSAA in WinRT. Has anyone found a workaround? I tried rudimentary supersampling (draw to larger buffer, then draw a scaled down quad), but this is unrealistic for production.

 

What are the options?


Arc camera view disappears when reaching highest/lowest elevation

11 August 2012 - 05:00 PM

I have an arc camera that behaves like this:
[source lang="csharp"] Matrix translation = Matrix.Translation(-Vector3.UnitZ * cameraDistance); Matrix elevation = Matrix.RotationX(MathUtil.DegreesToRadians(CameraElevation)); Matrix orientation = Matrix.RotationY(MathUtil.DegreesToRadians(CameraOrientation)); Matrix translation3D = translation * elevation * orientation; Position = translation3D.TranslationVector; View = Matrix.LookAtLH(Position, Vector3.Zero, Vector3.UnitY);[/source]
It works like a charm, minus one issue. If I set the maximum/minimum elevation to 90/-90 degrees respectively, then once the camera elevation reaches that limit, whatever I am viewing, disappears. The "hackish" solution is to set the bounds plus/minus some very small value (0.0001f).
However, I would still like to know what this is happening, and if there is a solution that doesn't involve adding/substracting magic numbers.

PARTNERS