Coder Social home page Coder Social logo

Multiple shader support about holojs HOT 11 CLOSED

microsoft avatar microsoft commented on May 13, 2024
Multiple shader support

from holojs.

Comments (11)

sjando avatar sjando commented on May 13, 2024 9

I've got a working example of multiple shaders running with three.js over at https://github.com/sjando/HoloJS/tree/three-multi-shader. The 'advanced drawing' mode of ANGLE ms-holographic-experimental is used and a three.js plugin handles all the instanced stereo rendering on the WebGL side. This required some small changes to ANGLE to expose all the required matrices. These changes also fix #25 (three.js culling issue). Could do a PR if this issue hasn't already been tackled (or would it be better to have any required changes merged into https://github.com/Microsoft/angle/tree/ms-holographic-experimental first?)

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

@sjando Sorry for my incredibly late reply; I started fixing the culling issue and as I was referencing the original issue I saw your reply above.

You made amazing progress with ThreeJS rendering support; it would be great if you want to do a PR and merge your work.

We can merge changes to angle/ms-holographic-experimental as needed. I noticed you removed the angle submodule in your fork. Would it be OK to keep the submodule, merge changes to ANGLE and move the angle submodule pointer forward?

from holojs.

trusktr avatar trusktr commented on May 13, 2024

Seems I posted a related issue: #62

@sjando Does your stuff still work? Can you list some steps on how to try your mod?

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

Good news everyone! I believe we have a simple solution for this issue.

We found a bug in angle-holographic involving the management of auto-stereo shaders. All shaders were converted to stereo, but the holographic rendering parameters are only updated for one of them - the last shader used in the previous frame. The fix is to update the shader's holographic parameters each time the program is changed, not just once once per frame on reset.

Please give this a try in the develop/multiple-shaders branch and let me know if it fixes this issue.

from holojs.

Reda-S avatar Reda-S commented on May 13, 2024

Hi Cristi,

Multishader support is working! Keep up the good work.

& very nice work on the web-ar protocol based viewer (wondering why not just make it part of the HoloLens edge browser, users wouldn't need to install any additional app they just browse to a web-ar address...)

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

Thank you for verifying the fix. I can't believe I get to close this issue.

About the web-ar sample, I'm sorry but can't comment on any browser plans.

from holojs.

sjando avatar sjando commented on May 13, 2024

Excellent stuff! Never found time to update my old pull request but this makes a lot of the ugly stuff in there unnecessary. Where can we find the updated angle-holographic code? Would be great if we can still expose a projection matrix to make culling work in e.g. three.js but retain the auto-stereo functionality.

@Almost-Done regarding your old comment about removing the angle submodule; if we are using prebuilt angle binaries now do we still need it? Right now the binaries and the submodule aren't even in sync anymore are they?

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

@sjando ANGLE is not a submodule of HoloJS anymore. To expedite the required ANGLE fixes, I forked ANGLE; the fixes are in https://github.com/Almost-Done/angle/tree/crispet/update-multiple-shaders

I was about to propose that you simplify your pull request to just fixing culling and we can take the required ANGLE changes to the forked branch for now. I'm working with ANGLE folks to merge these fixes at least into ms-experimental-holographic.

from holojs.

sjando avatar sjando commented on May 13, 2024

Submodule is still is in at the moment and relied upon for header files: https://github.com/Microsoft/HoloJS/blob/master/HoloJS/HoloJsHost/HoloJsHost.vcxproj#L127

Submodule hasn't been updated to point at your branch though.

I'll see if I can get angle changes into the forked branch and create a new pull request here for culling only

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

You are right, thank you for pointing out. I removed it from the solution but it's still a submodule and required for headers.

from holojs.

Almost-Done avatar Almost-Done commented on May 13, 2024

@sjando I created a pull request to update the submodule to point to the holojs/master branch.

Probably these commands will be required:
git submodule sync
git submodule update --init --recursive --remote

from holojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.