Skip to main content
added 96 characters in body
Source Link
Yuu
  • 21
  • 4

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test 

On my device:
On my device.gif because yes:

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's" 
Device 1

Device 2

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

How I use it:

projection->setToProjection( 0.0f, 200.0f, 75.0f, 1.0f);

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

How I use it:

projection->setToProjection( 0.0f, 200.0f, 75.0f, 1.0f);

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test 

On my device:
On my device.gif because yes:

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's" 
Device 1

Device 2

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

How I use it:

projection->setToProjection( 0.0f, 200.0f, 75.0f, 1.0f);
added 87 characters in body
Source Link
Yuu
  • 21
  • 4

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

How I use it:

projection->setToProjection( 0.0f, 200.0f, 75.0f, 1.0f);

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

How I use it:

projection->setToProjection( 0.0f, 200.0f, 75.0f, 1.0f);
added 613 characters in body
Source Link
Yuu
  • 21
  • 4

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago

The projection works perfectly on my device if I ignore some errors in the depth test

But... You must ask yourself what is the impossible mistake of this noob, right?

Let's look at another device with similar specifications:

Only the cube has disappeared ... the text works and the only difference between them is the projection.

Is it possible for a matrix4 to work only on specific devices?

On some devices the cube appears after clicking on the screen even though it is not related to rendering "with many depth glitch's"

My projection:

    auto fd =(float)( 1.0 / tan((fovy * (PI / 180.0))/2.0F));
    float a1 = (far+near)/(near-far);
    float a2 = (2* far * near)/(near-far);

    val[M00] = fd/aspectRatio;
    val[M01] = 0;
    val[M02] = 0;
    val[M03] = 0;

    val[M10] = 0;
    val[M11] = fd;
    val[M12] = 0;
    val[M13] = 0;

    val[M20] = 0;
    val[M21] = 0;
    val[M22] = a1;
    val[M23] = a2;

    val[M30] = 0;
    val[M31] = 0;
    val[M32] = -1;
    val[M33] = 0;
added 613 characters in body
Source Link
Yuu
  • 21
  • 4
Loading
added 613 characters in body
Source Link
Yuu
  • 21
  • 4
Loading
Rollback to Revision 4
Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401
Loading
added 613 characters in body
Source Link
Yuu
  • 21
  • 4
Loading
Fixing formatting
Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401
Loading
added 613 characters in body
Source Link
Yuu
  • 21
  • 4
Loading
added 114 characters in body
Source Link
Yuu
  • 21
  • 4
Loading
Source Link
Yuu
  • 21
  • 4
Loading