GearVRf icon indicating copy to clipboard operation
GearVRf copied to clipboard

Transform and state sorting reform

Open NolaDonato opened this issue 6 years ago • 31 comments

  1. Added capability to calculate matrices in a general way and put them in a transform blocfk
  2. Accumulated state sorting culling and transform code into a new RenderSorter class
  3. Custom state sorting for main scene, post effects and shadow maps
  4. Eliminated redundant GL state calls
  5. Accumulated all render state into a single 64 bit number
  6. Store render state in render pass
  7. Added transparent flag to ShaderData
  8. Added GVRRenderer class

GearVRF DCO signed off by: Nola Donato [email protected]

Not for merge yet - Vulkan is not working.

NolaDonato avatar Apr 10 '18 02:04 NolaDonato

There are some commits adding pictures that do not belong here.

liaxim avatar Apr 10 '18 13:04 liaxim

I removed the one picture that was left in the repo. How do I remove commits in the middle? I was in a hurry to finish Siggraph registration and they needed photos of a specific size for the badge. I used Git to transfer stuff between PC and Linux...

Caprica666 avatar Apr 11 '18 00:04 Caprica666

You could "git revert" the unwanted commits. Or use git interactive rebase - "git rebase -i HEAD~15" to drop those commits.

liaxim avatar Apr 11 '18 14:04 liaxim

And needs a rebase

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-accessibility doesn't look right: 1

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-controls:

2

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-immersivepedia

3

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-keyboard launches into a black screen

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-multilight - z-fighting?

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-modelviewer2 - looks weird, giant reticle

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-shadows doesn't look right as you look up and down

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-sceneobjects

4

liaxim avatar Apr 11 '18 15:04 liaxim

gvr-simplephysics, gvr-switch, gvr-tutorial-lesson6, gvr-x3d-demo all don't work

liaxim avatar Apr 11 '18 15:04 liaxim

Such a giant change needs to be backed up by automated tests proving correctness; or at least some level of. The previous thing was quite thoroughly tested over an extended period of time; I seriously doubt going through all the demo covers everything and can be considered enough for a change of this magnitude.

liaxim avatar Apr 11 '18 15:04 liaxim

Ok, is there a Demos pull request that goes along with this one that is missing?

liaxim avatar Apr 11 '18 16:04 liaxim

PR #597 in GearVRf-Demos addresses some of these issues. I am debugging the others. I think there is an issue with render mask which is why gvr-sceneobjects is broken. I also took out the default of making everything use alpha blending. This is why some of the others are broken. We should not have this on by default.

NolaDonato avatar Apr 11 '18 20:04 NolaDonato

There were some shader generation bugs causing some issues with the examples. I have fixed these. Now the immersivepedia, accessibility, shadows, controls, simplephysics, modelviewer2, keyboard, switch, tutorial , and x3ddemo samples work now.

NolaDonato avatar Apr 12 '18 01:04 NolaDonato

complexscene freezes.

roshanch avatar Apr 25 '18 18:04 roshanch

This PR has been merged with master and passes all the framework tests on OpenGL. Vulkan is still in development.

Asset tests have missing objects and sometimes only show for one eye.

The merge with master needs work.

NolaDonato avatar May 30 '18 09:05 NolaDonato

@NolaDonato @liaxim I think, we should merge OpenGL first. Already there are many commits in this PR, so it will be better to have Vulkan support as separate PR.

roshanch avatar May 30 '18 18:05 roshanch

If we do that Vulkan will be completely broken until that second pull request. In any case, take a look at the merge. Something broke in lighting and I could use some help evaluating whether I merged correctly.

NolaDonato avatar May 30 '18 18:05 NolaDonato

It is unfortunate that this work cannot be done in more incremental way.

liaxim avatar May 30 '18 18:05 liaxim

the reason I am saying it because efforts needed to rebase it. everyday we have to rebase it..

roshanch avatar May 30 '18 18:05 roshanch

@roshanch I absolutely agree. This is why this work needs to be broken down and done in increments. Also this pull is of such size that it is effectively un-reviewable. Increments we can reason about and easier to test since you can tell what to target.

liaxim avatar May 30 '18 18:05 liaxim

I just did the rebase. Since you have been doing it every day perhaps you can spot what I did wrong. Sushant and I are going to try to do the Vulkan part.

NolaDonato avatar May 30 '18 18:05 NolaDonato

I have done a lot of testing and the problem is not a merge failure. The code works fine on a Note8 with Android O. It fails on a Note8 with Android N. It also fails on an S8 with Android O. It appears to corrupt uniform blocks. The lighting anomalies are caused by the view matrix being incorrect. Printing it right before the uniform block is loaded into the GPU shows no errors. Still investigating.

NolaDonato avatar Jun 01 '18 20:06 NolaDonato

The issue is with the GL_MAX_VERTEX_UNIFORM_COMPONENTS query. Looks like the value returned by the driver is not reliable. For gvr-multilight, any block of more than 18 matrices (288 floats) does not work for the S8+ (adreno, Android N) I am using; even though the query returns 1024 (64 mats). Works fine for values 18 and below. Similar issues have existed for other drivers, but I wasnt able to find any documentation confirming if this is a known issue on this particular driver version. We'll need to come up with a reliable workaround for this.

sushantojal avatar Jun 04 '18 19:06 sushantojal

Should we close?

liaxim avatar Nov 28 '18 20:11 liaxim

No I am going to revive this one

NolaDonato avatar Nov 29 '18 19:11 NolaDonato

Revive against GearVRf instead of SXRSDK?!

liaxim avatar Nov 29 '18 20:11 liaxim