mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Add support for hybrid XFB
This commit is contained in:
@ -25,7 +25,7 @@ static const char s_vertex_shader[] = "out vec2 uv0;\n"
|
||||
"void main(void) {\n"
|
||||
" vec2 rawpos = vec2(gl_VertexID&1, gl_VertexID&2);\n"
|
||||
" gl_Position = vec4(rawpos*2.0-1.0, 0.0, 1.0);\n"
|
||||
" uv0 = rawpos * src_rect.zw + src_rect.xy;\n"
|
||||
" uv0 = vec2(mix(src_rect.xy, src_rect.zw, rawpos));\n"
|
||||
"}\n";
|
||||
|
||||
OpenGLPostProcessing::OpenGLPostProcessing() : m_initialized(false)
|
||||
@ -52,8 +52,8 @@ void OpenGLPostProcessing::BlitFromTexture(TargetRectangle src, TargetRectangle
|
||||
|
||||
glUniform4f(m_uniform_resolution, (float)src_width, (float)src_height, 1.0f / (float)src_width,
|
||||
1.0f / (float)src_height);
|
||||
glUniform4f(m_uniform_src_rect, src.left / (float)src_width, src.bottom / (float)src_height,
|
||||
src.GetWidth() / (float)src_width, src.GetHeight() / (float)src_height);
|
||||
glUniform4f(m_uniform_src_rect, src.left / (float)src_width, src.top / (float)src_height,
|
||||
src.right / (float)src_width, src.bottom / (float)src_height);
|
||||
glUniform1ui(m_uniform_time, (GLuint)m_timer.GetTimeElapsed());
|
||||
glUniform1i(m_uniform_layer, layer);
|
||||
|
||||
|
Reference in New Issue
Block a user