mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
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.
This commit is contained in:
parent
a6249b5388
commit
7514b41966
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user