Jump to content

  • Log In with Google      Sign In   
  • Create Account


Cachinnus

Member Since 18 Jul 2011
Offline Last Active Feb 07 2012 12:07 PM

Topics I've Started

Texture becomes pixelated when upsampling to full-screen quad and MSAA enabled

28 January 2012 - 09:54 AM

Hi.

So I am trying to upsample a texture to a full-screen quad. By turning on MSAA, the texture becomes pixelated, while everything seems perfect with no anti-aliasing.

This sample image sums up my problem pretty well I think:
Posted Image

I am using DirectX 11 with pixel/vertex shader 4.0, if it matters. I have tried searching for a solution, but the only relevant things I could find was about the half-pixel offset needed on DirectX 9, which shouldn't be a problem on DirectX 10+.

So my question is, does anyone recognise this problem? Any form of help is appreciated.

Thanks in advance.

2d car with simple suspension physics

18 July 2011 - 05:32 PM

Hi.

My first post here :)

I have recently started writing a simple game engine from scratch, mainly for the learning experience. The most difficult I've had yet is with the physics, and I feel I need some help from more experienced people.

The physics in question is for a side-scrolling 2d car game. The collisions seems to work out pretty good, but now I'm trying to implement suspension on the wheels of the car which has proven to be difficult. The suspension is very simple. On each wheel (of the two) there is a spring-damper-mass with one degree of freedom in the direction as seen as the red arrow in the illustration.

Take a look at the illustration. Without the suspension, things are pretty simple because we just apply the impulse normal to the collision surface, and get some new linear and angular velocities.

But with the suspension, I imagine some of this impulse is just added as spring/wheel velocity. And here I'm getting confused on how this changes the impulse on the car body. Here is what I currently do when a collision is detected:

  • Calculate the normal impulse as if the suspension was not there (unelastic collision)
  • Set new spring velocity such that it is the same as the velocity in the collision point (in the direction of it's freedom)
  • Subtract some of the spring's added velocity from the normal impulse
  • Apply normal impulse (from 1 & 3) to car body
  • Update spring velocity and position, add reverse directed impulse on the car body (done every frame regardless of collision)
This does work to a certain degree, but has some shortcomings, and it's not all theoretically founded.

If somebody could explain to me how the collision in my illustration will behave I will be eternally happy :) And I'm sure there is a more efficient way than how I resolve collisions. Any ideas and suggestions in this regard is also very welcome.

Thanks for reading!

PARTNERS