csirke128

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

111 Neutral

About csirke128

  • Rank
    Newbie
  1. SMAA Implementation - Weights Pass

    Hi, I've been working on a small 2d drawing app, and i wanted to implement SMAA for it, but i've ran into problems at the 2nd pass, instead of having nice connected lines, i had a lot of dotted lines, and nothing i did in the shaders/c++ code could change it, so i looked around in the SMAA.h and noticed some commented lines: [CODE] float SMAASearchLength(SMAATexture2D searchTex, float2 e, float bias, float scale) { // Not required if searchTex accesses are set to point: // float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0); // e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE + // e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE; e.r = bias + e.r * scale; return 255.0 * SMAASampleLevelZeroPoint(searchTex, e).r; } [/CODE] And after i've changed it to this, [CODE] float SMAASearchLength(SMAATexture2D searchTex, float2 e, float bias, float scale) { // Not required if searchTex accesses are set to point: float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0); e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE + e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE; //e.r = bias + e.r * scale; return 255.0 * SMAASampleLevelZeroPoint(searchTex, e).r; } [/CODE] everything worked fine for comparison: Before [attachment=11856:smaa1.PNG] After [attachment=11857:smaa2.PNG] It might not be the same problem, but i think its worth checking it out (I was using directX11 on windows8, no techinques/effects just pixel and vertex shader)