Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 14 Feb 2007
Online Last Active Today, 08:09 PM

Posts I've Made

In Topic: My latest Machinations

Today, 08:01 AM

Nice drifting simulation!

In Topic: Effects (Object vs Particle vs Shader)

Today, 07:05 AM

Every single thing drawn to the screen in both images uses shaders - they're the programs that GPUs run, which tell it how to draw anything :D


Effect 1 looks like a trail of billboard sprites (could be managed by a particle system, or hand-coded).

Effect 2 looks like a group of animated meshes, plus a particle system that is spawning rock meshes.

In Topic: SSE denormals

Today, 01:10 AM

You can also look into _controlfp_s to fiddle with the SSE floating point behaviour.
Are you actually using SSE instructions in your filter though? Setting the SSE register to round to zero won't help if you're not...
If you're using regular floats (not SSE value), then you're probably looking for something like fesetenv to set the flush/round mode...
This will depend on your compiler...
e.g. on MSVC you'd use https://msdn.microsoft.com/en-us/library/e9b52ceh.aspx
To verify your hypthesis that denormals are actually your problem, you can check for them like this:

#include <cmath>
if ( std::fpclassify( your_float_here ) == FP_SUBNORMAL ) printf("found a denormal!\n");

If your compiler is very old, it might provide it's own custom fpclassify function. Check it's documentation.

Also read this:

You probably want to enable the "underflow exception", which will trigger if any of your math ever produces a denormal float. You can then fix your code so that it doesn't happen.
In my experience with games (where performance is also a large concern), this is often used to find causes of denormal numbers and fix that code before shipping the game.

I don't know anything about Borland but I see no reason why denormalized numbers would be a problem.

CPU's often decide to run 100 to 1000 times slower when you give them a denormalized float. Their existence in your data sets can be a massive performance pitfall.




p.s. can everyone in this thread please try not to be so damn rude to each other. Yes you. You're being rude. Stahp.

In Topic: What is a game? (ancient secret Revealed)

Yesterday, 09:08 PM

What happened in 2000?

The fateful day of Dubstep, the day the music died.

The day the music died was February 3, 1959.

In Topic: What is a game? (ancient secret Revealed)

Yesterday, 08:57 PM

What happened in 2000?