mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Update post-processing shaders to work again after removing u_viewproj.
Initialize some uninitialized variables.
This commit is contained in:
parent
70e4214e2e
commit
b9c908ba3f
7 changed files with 9 additions and 12 deletions
|
@ -277,6 +277,9 @@ FramebufferManager::FramebufferManager() :
|
||||||
convBuf(0),
|
convBuf(0),
|
||||||
draw2dprogram_(0),
|
draw2dprogram_(0),
|
||||||
postShaderProgram_(0),
|
postShaderProgram_(0),
|
||||||
|
postShaderAtOutputResolution_(false),
|
||||||
|
plainColorLoc_(-1),
|
||||||
|
resized_(false),
|
||||||
textureCache_(0),
|
textureCache_(0),
|
||||||
shaderManager_(0),
|
shaderManager_(0),
|
||||||
usePostShader_(false)
|
usePostShader_(false)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
uniform vec2 u_texelDelta;
|
uniform vec2 u_texelDelta;
|
||||||
|
|
||||||
varying vec4 v_texcoord0;
|
varying vec4 v_texcoord0;
|
||||||
|
@ -21,7 +20,7 @@ void main()
|
||||||
vec2 dg2 = vec2(-x,y);
|
vec2 dg2 = vec2(-x,y);
|
||||||
vec2 sd1 = dg1*0.5;
|
vec2 sd1 = dg1*0.5;
|
||||||
vec2 sd2 = dg2*0.5;
|
vec2 sd2 = dg2*0.5;
|
||||||
gl_Position = u_viewproj * a_position;
|
gl_Position = a_position;
|
||||||
v_texcoord0=a_texcoord0.xyxy;
|
v_texcoord0=a_texcoord0.xyxy;
|
||||||
v_texcoord1.xy = v_texcoord0.xy - sd1;
|
v_texcoord1.xy = v_texcoord0.xy - sd1;
|
||||||
v_texcoord2.xy = v_texcoord0.xy - sd2;
|
v_texcoord2.xy = v_texcoord0.xy - sd2;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
uniform vec2 u_texelDelta;
|
uniform vec2 u_texelDelta;
|
||||||
|
|
||||||
varying vec4 v_texcoord0;
|
varying vec4 v_texcoord0;
|
||||||
|
@ -21,7 +20,7 @@ void main()
|
||||||
{
|
{
|
||||||
float x = u_texelDelta.x*scaleoffset;
|
float x = u_texelDelta.x*scaleoffset;
|
||||||
float y = u_texelDelta.y*scaleoffset;
|
float y = u_texelDelta.y*scaleoffset;
|
||||||
gl_Position = u_viewproj * a_position;
|
gl_Position = a_position;
|
||||||
v_texcoord0 = a_texcoord0.xyxy;
|
v_texcoord0 = a_texcoord0.xyxy;
|
||||||
v_texcoord1 = v_texcoord0;
|
v_texcoord1 = v_texcoord0;
|
||||||
v_texcoord2 = v_texcoord0;
|
v_texcoord2 = v_texcoord0;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
uniform vec2 u_texelDelta;
|
uniform vec2 u_texelDelta;
|
||||||
|
|
||||||
varying vec4 v_texcoord0;
|
varying vec4 v_texcoord0;
|
||||||
|
@ -21,7 +20,7 @@ void main()
|
||||||
vec2 dg2 = vec2(-x,y);
|
vec2 dg2 = vec2(-x,y);
|
||||||
vec2 dx = vec2(x,0.0);
|
vec2 dx = vec2(x,0.0);
|
||||||
vec2 dy = vec2(0.0,y);
|
vec2 dy = vec2(0.0,y);
|
||||||
gl_Position = u_viewproj * a_position;
|
gl_Position = a_position;
|
||||||
v_texcoord0=a_texcoord0.xyxy;
|
v_texcoord0=a_texcoord0.xyxy;
|
||||||
v_texcoord1.xy = v_texcoord0.xy - dy;
|
v_texcoord1.xy = v_texcoord0.xy - dy;
|
||||||
v_texcoord2.xy = v_texcoord0.xy + dy;
|
v_texcoord2.xy = v_texcoord0.xy + dy;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
varying vec2 v_texcoord0;
|
varying vec2 v_texcoord0;
|
||||||
void main() {
|
void main() {
|
||||||
v_texcoord0 = a_texcoord0;
|
v_texcoord0 = a_texcoord0;
|
||||||
gl_Position = u_viewproj * a_position;
|
gl_Position = a_position;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ uniform vec4 u_texelDelta;
|
||||||
|
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
|
|
||||||
varying vec4 v_texcoord0;
|
varying vec4 v_texcoord0;
|
||||||
varying vec4 v_texcoord1;
|
varying vec4 v_texcoord1;
|
||||||
|
@ -11,7 +10,7 @@ varying vec4 v_texcoord3;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position=u_viewproj * a_position;
|
gl_Position=a_position;
|
||||||
|
|
||||||
v_texcoord0=a_texcoord0.xyxy+vec4(-0.5,-0.5,-1.5,-1.5)*u_texelDelta.xyxy;
|
v_texcoord0=a_texcoord0.xyxy+vec4(-0.5,-0.5,-1.5,-1.5)*u_texelDelta.xyxy;
|
||||||
v_texcoord1=a_texcoord0.xyxy+vec4( 0.5,-0.5, 1.5,-1.5)*u_texelDelta.xyxy;
|
v_texcoord1=a_texcoord0.xyxy+vec4( 0.5,-0.5, 1.5,-1.5)*u_texelDelta.xyxy;
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
attribute vec4 a_position;
|
attribute vec4 a_position;
|
||||||
attribute vec2 a_texcoord0;
|
attribute vec2 a_texcoord0;
|
||||||
uniform mat4 u_viewproj;
|
|
||||||
|
|
||||||
varying vec2 v_position;
|
varying vec2 v_position;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = u_viewproj * a_position;
|
gl_Position = a_position;
|
||||||
|
|
||||||
v_position = a_texcoord0;
|
v_position = a_texcoord0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue