Skip to content

Commit

Permalink
syncronize to raylib-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GuvaCode committed Oct 26, 2021
1 parent 9b64113 commit ab874e9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions binary/resources/distortion100.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ uniform vec2 leftScreenCenter;
uniform vec2 rightScreenCenter;
uniform vec2 scale;
uniform vec2 scaleIn;
uniform vec4 hmdWarpParam;
uniform vec4 deviceWarpParam;
uniform vec4 chromaAbParam;

void main()
Expand All @@ -27,7 +27,7 @@ void main()
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
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 tcBlue = lensCenter + scale*thetaBlue;

Expand Down
4 changes: 2 additions & 2 deletions binary/resources/distortion330.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ uniform vec2 leftScreenCenter = vec2(0.25, 0.5);
uniform vec2 rightScreenCenter = vec2(0.75, 0.5);
uniform vec2 scale = vec2(0.25, 0.45);
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);

void main()
Expand All @@ -28,7 +28,7 @@ void main()
vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter;
vec2 theta = (fragTexCoord - lensCenter)*scaleIn;
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 tcBlue = lensCenter + scale*thetaBlue;

Expand Down
Binary file removed binary/resources/models/gltf/GearboxAssy.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion source/ray_header.pas
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ TMesh = record
// Animation vertex data
animVertices : Psingle; // Animated vertex positions (after bones transformations)
animNormals : Psingle; // Animated normals (after bones transformations)
boneIds : Plongint; // Vertex bone ids, up to 4 bones influence by vertex (skinning)
boneIds : Pbyte; // Vertex bone ids, up to 4 bones influence by vertex (skinning)
boneWeights : Psingle; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
// OpenGL identifiers
vaoId : dword; // OpenGL Vertex Array Object id
Expand Down

0 comments on commit ab874e9

Please sign in to comment.