Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLSL: fix msaa egdes
MSAA is a optimiztion to execute the fragment shader just once per pixel instead per sample.
It sounds great, but has a big issue: At edges where the center isn't in the polygon, the
fragment would still be executed, but still with the center of the pixel as position.
So if some calculations aren't allowed outside the polygon, the result would be invalid.

But the nice one: we can give a hint to each input to be choosen from a valid pixel,
so now every pixel will be calculated with valid source.
  • Loading branch information
degasus committed Mar 19, 2013
1 parent a6249b5 commit 7514b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
Expand Up @@ -505,8 +505,8 @@ void ProgramShaderCache::CreateHeader ( void )
"\n"// A few required defines and ones that will make our lives a lot easier
"#define ATTRIN in\n"
"#define ATTROUT out\n"
"#define VARYIN in\n"
"#define VARYOUT out\n"
"#define VARYIN centroid in\n"
"#define VARYOUT centroid out\n"

// Silly differences
"#define float2 vec2\n"
Expand Down

0 comments on commit 7514b41

Please sign in to comment.