Original Post
I'm gathering this should be a really straight forward question, someone with some good shader knowledge should be able to help me here pretty easy I think.
I'm trying to achieve this effect around a black hole in a 3d world.
http://www.genetologisch-onderzoek.nl/wp-content/image_upload/blackhole.jpg
Problem is my knowledge with shaders isn't the best and I'm a little brain dead. What I've setup so far is a full screen shader effect which does nothing as of now, it just displays my renter target to the screen. But I have already created a few things I know I'll need for the shader. Such as - I've converted the black holes position in 3d space to a 2d coordinate on screen, so I know where to technically center the distortion effect. And I have the distance between the camera to the black holes position. With those to values I should be able to create that distortion effect.
So if anyone is kind enough to show me how creating an effect like this could be done in a pixel shader it would be much appreciated.
Thanks a heap,
Scott.
I'm trying to achieve this effect around a black hole in a 3d world.
http://www.genetologisch-onderzoek.nl/wp-content/image_upload/blackhole.jpg
Problem is my knowledge with shaders isn't the best and I'm a little brain dead. What I've setup so far is a full screen shader effect which does nothing as of now, it just displays my renter target to the screen. But I have already created a few things I know I'll need for the shader. Such as - I've converted the black holes position in 3d space to a 2d coordinate on screen, so I know where to technically center the distortion effect. And I have the distance between the camera to the black holes position. With those to values I should be able to create that distortion effect.
So if anyone is kind enough to show me how creating an effect like this could be done in a pixel shader it would be much appreciated.
Thanks a heap,
Scott.
