mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 16:29:21 +01:00
Cosmetics.
This commit is contained in:
parent
9b4185ffdf
commit
4d9589b35f
@ -36,7 +36,8 @@ static char s_vertex_shader[] =
|
|||||||
" uv0 = rawpos * src_rect.zw + src_rect.xy;\n"
|
" uv0 = rawpos * src_rect.zw + src_rect.xy;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
OpenGLPostProcessing::OpenGLPostProcessing() : m_initialized(false)
|
OpenGLPostProcessing::OpenGLPostProcessing()
|
||||||
|
: m_initialized(false)
|
||||||
{
|
{
|
||||||
CreateHeader();
|
CreateHeader();
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ Renderer::Renderer()
|
|||||||
glClearDepthf = ClearDepthf;
|
glClearDepthf = ClearDepthf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(GLExtensions::Version() >= 320))
|
if (GLExtensions::Version() < 320)
|
||||||
{
|
{
|
||||||
glFramebufferTexture = FramebufferTexture;
|
glFramebufferTexture = FramebufferTexture;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ set(SRCS BoundingBox.cpp
|
|||||||
Fifo.cpp
|
Fifo.cpp
|
||||||
FPSCounter.cpp
|
FPSCounter.cpp
|
||||||
FramebufferManagerBase.cpp
|
FramebufferManagerBase.cpp
|
||||||
|
GeometryShaderGen.cpp
|
||||||
HiresTextures.cpp
|
HiresTextures.cpp
|
||||||
ImageWrite.cpp
|
ImageWrite.cpp
|
||||||
IndexGenerator.cpp
|
IndexGenerator.cpp
|
||||||
@ -38,8 +39,7 @@ set(SRCS BoundingBox.cpp
|
|||||||
VideoConfig.cpp
|
VideoConfig.cpp
|
||||||
VideoState.cpp
|
VideoState.cpp
|
||||||
XFMemory.cpp
|
XFMemory.cpp
|
||||||
XFStructs.cpp
|
XFStructs.cpp)
|
||||||
GeometryShaderGen.cpp)
|
|
||||||
set(LIBS core png)
|
set(LIBS core png)
|
||||||
|
|
||||||
if(_M_X86)
|
if(_M_X86)
|
||||||
|
@ -70,23 +70,30 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
|
|||||||
out.Write("flat out int layer;\n");
|
out.Write("flat out int layer;\n");
|
||||||
|
|
||||||
out.Write("void main()\n{\n");
|
out.Write("void main()\n{\n");
|
||||||
|
|
||||||
if (g_ActiveConfig.backend_info.bSupportsGSInstancing)
|
if (g_ActiveConfig.backend_info.bSupportsGSInstancing)
|
||||||
out.Write("\tlayer = gl_InvocationID;\n");
|
out.Write("\tlayer = gl_InvocationID;\n");
|
||||||
else
|
else
|
||||||
out.Write("\tfor (layer = 0; layer < %d; ++layer) {\n", g_ActiveConfig.bStereo ? 2 : 1);
|
out.Write("\tfor (layer = 0; layer < %d; ++layer) {\n", g_ActiveConfig.bStereo ? 2 : 1);
|
||||||
|
|
||||||
out.Write("\tgl_Layer = layer;\n");
|
out.Write("\tgl_Layer = layer;\n");
|
||||||
out.Write("\tvec4 stereoproj = "I_PROJECTION"[0];\n");
|
out.Write("\tvec4 stereoproj = "I_PROJECTION"[0];\n");
|
||||||
out.Write("\tstereoproj[2] += "I_STEREOOFFSET"[layer] * stereoproj[0];\n");
|
out.Write("\tstereoproj[2] += "I_STEREOOFFSET"[layer] * stereoproj[0];\n");
|
||||||
|
|
||||||
out.Write("\tfor (int i = 0; i < gl_in.length(); ++i) {\n");
|
out.Write("\tfor (int i = 0; i < gl_in.length(); ++i) {\n");
|
||||||
out.Write("\t\to = v[i];\n");
|
out.Write("\t\to = v[i];\n");
|
||||||
|
|
||||||
if (g_ActiveConfig.bStereo)
|
if (g_ActiveConfig.bStereo)
|
||||||
out.Write("\t\to.pos = float4(dot(stereoproj, v[i].rawpos), dot(" I_PROJECTION"[1], v[i].rawpos), dot(" I_PROJECTION"[2], v[i].rawpos), dot(" I_PROJECTION"[3], v[i].rawpos)); \n");
|
out.Write("\t\to.pos = float4(dot(stereoproj, v[i].rawpos), dot(" I_PROJECTION"[1], v[i].rawpos), dot(" I_PROJECTION"[2], v[i].rawpos), dot(" I_PROJECTION"[3], v[i].rawpos)); \n");
|
||||||
|
|
||||||
out.Write("\t\tgl_Position = o.pos;\n");
|
out.Write("\t\tgl_Position = o.pos;\n");
|
||||||
out.Write("\t\tEmitVertex();\n");
|
out.Write("\t\tEmitVertex();\n");
|
||||||
out.Write("\t}\n");
|
out.Write("\t}\n");
|
||||||
out.Write("\tEndPrimitive();\n");
|
out.Write("\tEndPrimitive();\n");
|
||||||
|
|
||||||
if (!g_ActiveConfig.backend_info.bSupportsGSInstancing)
|
if (!g_ActiveConfig.backend_info.bSupportsGSInstancing)
|
||||||
out.Write("\t}\n");
|
out.Write("\t}\n");
|
||||||
|
|
||||||
out.Write("}\n");
|
out.Write("}\n");
|
||||||
|
|
||||||
if (is_writing_shadercode)
|
if (is_writing_shadercode)
|
||||||
|
@ -125,11 +125,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
|
|||||||
out.Write("in float%d tex%d; // ATTR%d,\n", hastexmtx ? 3 : 2, i, SHADER_TEXTURE0_ATTRIB + i);
|
out.Write("in float%d tex%d; // ATTR%d,\n", hastexmtx ? 3 : 2, i, SHADER_TEXTURE0_ATTRIB + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.Write("centroid out VS_OUTPUT %s;\n", (g_ActiveConfig.bStereo) ? "v" : "o");
|
||||||
if (g_ActiveConfig.bStereo)
|
|
||||||
out.Write("centroid out VS_OUTPUT v;\n");
|
|
||||||
else
|
|
||||||
out.Write("centroid out VS_OUTPUT o;\n");
|
|
||||||
|
|
||||||
out.Write("void main()\n{\n");
|
out.Write("void main()\n{\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user