Redesigned stereo rendering mechanism
Now it's easier for the user! Just init Oculus device and get stereo rendering!
This commit is contained in:
parent
164ead03c9
commit
ee72654b55
6 changed files with 259 additions and 244 deletions
|
@ -50,22 +50,15 @@ int main()
|
|||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
|
||||
Begin3dMode(camera);
|
||||
|
||||
for (int eye = 0; eye < 2; eye++)
|
||||
{
|
||||
SetOculusView(eye);
|
||||
|
||||
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
|
||||
DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
|
||||
|
||||
DrawGrid(10, 1.0f);
|
||||
|
||||
DrawDefaultBuffers(); // Process internal dynamic buffers
|
||||
}
|
||||
|
||||
End3dMode();
|
||||
|
||||
|
|
|
@ -10,12 +10,13 @@ uniform sampler2D texture0;
|
|||
out vec4 finalColor;
|
||||
|
||||
// NOTE: Add here your custom variables
|
||||
const vec2 LeftLensCenter = vec2(0.2863248, 0.5);
|
||||
const vec2 RightLensCenter = vec2(0.7136753, 0.5);
|
||||
const vec2 LeftLensCenter = vec2(0.288, 0.5);
|
||||
const vec2 RightLensCenter = vec2(0.712, 0.5);
|
||||
const vec2 LeftScreenCenter = vec2(0.25, 0.5);
|
||||
const vec2 RightScreenCenter = vec2(0.75, 0.5);
|
||||
const vec2 Scale = vec2(0.25, 0.45); //vec2(0.1469278, 0.2350845);
|
||||
const vec2 ScaleIn = vec2(4, 2.2222);
|
||||
uniform vec2 Scale = vec2(0.25, 0.45); //vec2(0.1469278, 0.2350845);
|
||||
uniform vec2 ScaleIn = vec2(4, 2.2222);
|
||||
|
||||
const vec4 HmdWarpParam = vec4(1, 0.22, 0.24, 0);
|
||||
const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue