mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Multithreadded Shadergen: First Pass over vertex/lighting Shadergens
The only code which touches xfmem is code which writes directly into uid_data. All the rest now read their parameters out of uid_data. I also simplified the lighting code so it always generated seperate codepaths for alpha and color channels instead of trying to combine them on the off-chance that the same equation works for all 4 channels. As modern (post 2008) GPUs generally don't calcualte all 4 channels in a single vector, this optimisation is pointless. The shader compiler will undo it during the GLSL/HLSL to IR step. Bug Fix: The about optimisation was also broken, applying the color light equation to the alpha light channel instead of the alpha light euqation. But doesn't look like anything trigged this bug.
This commit is contained in:
@ -319,7 +319,7 @@ static T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType)
|
||||
// can be made and
|
||||
// doesn't define what will happen if we discard the fragment. But the way modern graphics
|
||||
// hardware is implemented
|
||||
// means it is not unreasonable to expect the the same behaviour as early_fragment_tests.
|
||||
// means it is not unreasonable to expect the same behaviour as early_fragment_tests.
|
||||
// We can also assume that if a driver has gone out of its way to support conservative depth and
|
||||
// not image_load_store
|
||||
// as required by OpenGL 4.2 that it will be doing the optimisation.
|
||||
@ -579,7 +579,7 @@ static T GeneratePixelShader(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType)
|
||||
|
||||
out.Write("\tfloat2 screenpos = rawpos.xy * " I_EFBSCALE ".xy;\n");
|
||||
|
||||
// Opengl has reversed vertical screenspace coordiantes
|
||||
// Opengl has reversed vertical screenspace coordinates
|
||||
if (ApiType == API_OPENGL)
|
||||
out.Write("\tscreenpos.y = %i.0 - screenpos.y;\n", EFB_HEIGHT);
|
||||
|
||||
|
Reference in New Issue
Block a user