Git Product home page Git Product logo

Comments (4)

jnsmalm avatar jnsmalm commented on August 21, 2024

I went to http://babylonhx.com/pixiambient/ , is the issue that it's transparent?

from pixi3d.

jnsmalm avatar jnsmalm commented on August 21, 2024

Not sure which problems you had, but using your code it works pretty well. Seems like you forgot one thing though, in standard-material.ts make sure you have the following code in "updateUniforms" function:

switch (light.type) {
        case LightType.point: type = 1; break
        case LightType.directional: type = 0; break
        case LightType.spot: type = 2; break
        case LightType.ambient: type = 3; break
      }

Also, it will make a difference depending on the settings of the material of the object (metallic and roughness).

I'll see if I can add ambient lighting in Pixi3D soon, let me know if you have additional issues.

from pixi3d.

vujadin avatar vujadin commented on August 21, 2024

My code works just fine, no issues at all. I do have that part in "updateUniforms", it wouldn't work without it:
vujadin@192a3ed#diff-fc6cad664a018cca57b22da32546f5ce77ec793efc0910233439c2acca887e82

No issues at all, this was just a suggestion for adding ambient light to the framework. Closing this now...

from pixi3d.

jnsmalm avatar jnsmalm commented on August 21, 2024

Thanks for the help, I added your implementation to the develop branch 👍

from pixi3d.

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.