Reviewed uniform name
This commit is contained in:
parent
5761bf7e19
commit
2d82788e42
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ uniform vec2 leftScreenCenter;
|
||||||
uniform vec2 rightScreenCenter;
|
uniform vec2 rightScreenCenter;
|
||||||
uniform vec2 scale;
|
uniform vec2 scale;
|
||||||
uniform vec2 scaleIn;
|
uniform vec2 scaleIn;
|
||||||
uniform vec4 hmdWarpParam;
|
uniform vec4 deviceWarpParam;
|
||||||
uniform vec4 chromaAbParam;
|
uniform vec4 chromaAbParam;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
@ -27,7 +27,7 @@ void main()
|
||||||
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
|
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
|
||||||
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
|
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
|
||||||
float rSq = theta.x*theta.x + theta.y*theta.y;
|
float rSq = theta.x*theta.x + theta.y*theta.y;
|
||||||
vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq);
|
vec2 theta1 = theta*(deviceWarpParam.x + deviceWarpParam.y*rSq + deviceWarpParam.z*rSq*rSq + deviceWarpParam.w*rSq*rSq*rSq);
|
||||||
vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq);
|
vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq);
|
||||||
vec2 tcBlue = lensCenter + scale*thetaBlue;
|
vec2 tcBlue = lensCenter + scale*thetaBlue;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ uniform vec2 leftScreenCenter = vec2(0.25, 0.5);
|
||||||
uniform vec2 rightScreenCenter = vec2(0.75, 0.5);
|
uniform vec2 rightScreenCenter = vec2(0.75, 0.5);
|
||||||
uniform vec2 scale = vec2(0.25, 0.45);
|
uniform vec2 scale = vec2(0.25, 0.45);
|
||||||
uniform vec2 scaleIn = vec2(4, 2.2222);
|
uniform vec2 scaleIn = vec2(4, 2.2222);
|
||||||
uniform vec4 hmdWarpParam = vec4(1, 0.22, 0.24, 0);
|
uniform vec4 deviceWarpParam = vec4(1, 0.22, 0.24, 0);
|
||||||
uniform vec4 chromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
|
uniform vec4 chromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
@ -28,7 +28,7 @@ void main()
|
||||||
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
|
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
|
||||||
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
|
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
|
||||||
float rSq = theta.x*theta.x + theta.y*theta.y;
|
float rSq = theta.x*theta.x + theta.y*theta.y;
|
||||||
vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq);
|
vec2 theta1 = theta*(deviceWarpParam.x + deviceWarpParam.y*rSq + deviceWarpParam.z*rSq*rSq + deviceWarpParam.w*rSq*rSq*rSq);
|
||||||
vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq);
|
vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq);
|
||||||
vec2 tcBlue = lensCenter + scale*thetaBlue;
|
vec2 tcBlue = lensCenter + scale*thetaBlue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue