Author Topic: Graphic bug when using antialiasing + Shadows  (Read 8769 times)

Nacery

  • Apprentice
  • *
  • Posts: 8
    • View Profile
Graphic bug when using antialiasing + Shadows
« on: May 22, 2009, 02:15:54 AM »
Seems that sometimes the engine can't render correctly the shadows when image is antialiased


admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #1 on: May 22, 2009, 02:19:48 PM »
Thanks for reporting this.  I think I know what to do to fix it.

  - Rob
    Founder, Lazy 8 Studios

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #2 on: May 22, 2009, 06:14:51 PM »
I just posted Patch 1, Candidate 2, which will hopefully fix this bug.

    http://www.lazy8studios.com/cogs_patch_beta

  - Rob

Nacery

  • Apprentice
  • *
  • Posts: 8
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #3 on: May 23, 2009, 03:11:32 AM »
Seems that not yet  :-\


admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #4 on: May 23, 2009, 05:32:09 PM »
Thanks again for your bug report!  I managed to find and ATI card where I could reproduce this and just released Patch 1, Candidate 3 which at least works on the test machine.  For those who are interested in the technical details, here's what I found:

When antialiasing is disabled, you can render to a Direct3D surface created with the D3DXCreateTexture and GetSurfaceLevel commands.  When antialiasing is turned on, my nVidia card has rendering artifacts unless it's rendering to a surface created with the CreateRenderTarget function.  The only way I've found to treat this surface as a texture in later render stages is to also create a texture with D3DXCreateTexture and use StretchRect to copy from the render target to the texture.

Unfortunately, trying to create a multisampled render target with a floating point format fails on the ATI Radeon.  But using the standard texture works without any artifacts.

My solution: When antialiasing is turned on, try to create the target surface with CreateRenderTarget.  If this fails, revert to the standard D3DXCreateTexture function.

Now hopefully, it works for everyone.

  - Rob

Nacery

  • Apprentice
  • *
  • Posts: 8
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #5 on: May 24, 2009, 03:43:52 AM »
Good job, now runs flawlessly ;)
« Last Edit: May 24, 2009, 03:49:44 AM by Nacery »

nagpurmh31

  • Apprentice
  • *
  • Posts: 1
    • View Profile
Re: Graphic bug when using antialiasing + Shadows
« Reply #6 on: August 29, 2011, 04:54:30 AM »
When antialiasing is turned on, my nVidia card has rendering artifacts unless it's rendering to a surface created with the CreateRenderTarget function.

 

mini shell dr hex shell mini mass shell 0byt3m1n1 mini shell zero byte mini shell wso shell sadrazam shell b374k Shell Alfa Shell Recovery Shell indoXploit Shell k2ll33d Shell r57 shell c99 shell Aerul Shell v4 Priv8