• Advertisement

w0dk4

Member
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

122 Neutral

About w0dk4

  • Rank
    Newbie
  1. So there is no *proper* way to detect this? [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img] How do other games do this then that use deferred rendering? Or if you have developed a deferred renderer, do you care about this / have you implemented something that works well?
  2. Hey there, my problem is that I am coding a deferred renderer on Direct3D9 and when you force Anti Aliasing through the driver, nothing gets rendered for obvious reason, Is there a best practice to prevent this behaviour? Or if it is not possible to prevent, how could I detect if AA is forced? Direct3D does not seem to throw any errors...
  3. Yeah, they go from the left to the right. Anyways, I found what the issue was. For some reason, I was using 64bit floating point textures. Switching to D3DFMT_A8R8G8B8 completely solved the issue. Im not sure why though. /oh hi LS :) [Edited by - w0dk4 on April 25, 2010 8:52:26 AM]
  4. Hello there, I have a very weird problem where I really doubt wether Im seeing things clearly, so please have a look if Im doing something obviously wrong here. So, I got a scene rendered to the backbuffer, I stretchrect it to a 4 times smaller texture. Now I apply a brightpass, rendering to a new texture of the same size: So, now I'll apply the following gaussian blur, as found on many sources on the internet, to blur the texture, in order for the highlighted parts to shine over the X-Wings front. Only that it does the exact opposite, it actually blurs inwards: float g_blurRadiusX; float g_blurRadiusY; static const int kernelSize = 9; //Blur Weights static const float BlurWeights[kernelSize] = { 0.05f, 0.09f, 0.12f, 0.15f, 0.16f, 0.15f, 0.12f, 0.09f, 0.05f }; float4 BlurH_PS( VS_OUTPUT In ) : COLOR0 { float4 color = 0; float2 texCoord = In.TextureUV; for (int i = 0; i < kernelSize; i++) { texCoord.x = In.TextureUV.x + ((i-4)*g_blurRadiusX); color += tex2D(Tex0Sampler, texCoord) * BlurWeights[i]; } return color; } float4 BlurV_PS( VS_OUTPUT In ) : COLOR0 { float4 color = 0; float2 texCoord = In.TextureUV; for (int i = 0; i < kernelSize; i++) { texCoord.y = In.TextureUV.y + ((i-4)*g_blurRadiusY); color += tex2D(Tex0Sampler, texCoord) * BlurWeights[i]; } return color; } (blurRadiusX is 1/TexWidth and so on) Anybody might have any idea on whats going on here? A note: After I rendered the brightpass, I use the downsample texture as a rendertarget, and so on. So I dont always create a new texture, but reuse the old ones, after Clearing them with 0 0 0 0.
  5. Bloom Effect in D3D8

    Yeah, thanks, as I said I already hooked the device, but I tried to draw the "hook successful" text, and yeah it worked :) Guess I now have to learn some more DirectX basics, but my problem is: All of those bloom effect tutorials use some sort of HLSL shader.. Does Direct3D8 support HLSL? If not, would there be some way to convert those shaders.. sorry, Im really a newbie ;)
  6. Hi there, I'm currently looking for a way to add a bloom effect to an older Direct3D8 game (Freelancer if your interested). I hooked the d3d8.dll interface and my idea is to apply the effect on the Device->Present(..) hook (I know, that way also the menus and fonts and whatsoever will get bloom, but well, bloom everywhere better then no bloom at all^^). First question: Is such an effect actually doable with the Direct3D8 interface? I read some tutorials that render the scene to a texture, then apply a shader that darkens and then blurs the picture, and then re-applies it to the backbuffer... or something like that ;) Since Im a complete DirectX noob I would be glad for any code examples on how to do that with Direct3D8. thanks in advance w0dk4
  • Advertisement