Giter VIP home page Giter VIP logo

Comments (4)

sshukul avatar sshukul commented on July 30, 2024

So I looked into this a bit more and got the issue "semi-fixed" now by adding this to line 241 of MOAIGfxDeviceMtxCache.cpp inside SetVertexTransform() :

 this->UpdateShaderGlobals ();

It looks like there was an UpdatePipelineTransforms() call at the end of the SetVertexTransform() function in 1.5 but this is missing from 1.7. The UpdateShaderGlobals() function looks like it's new equivalent.

This almost fixes the issue to where the world global is being updated for things like scale.

The problem is it's not consistent and occasionally doesn't update ... for example, in my game I've got a player character that's made of a MOAITransform which is the parent to many separate MOAIProp2D objects for the body parts (like head, arms, legs etc.). It's done that way using a Moai plugin for Spriter. With this new fix, the world transform updates most of the time, but after a few switches back and forth to the scale, one of the props will not get the updated transform, so it's lighting is backwards compared to the rest of the body, like so:

http://i.imgur.com/4mY2wp2.jpg

Notice the shoulder / upper arm prop is lighted backwards compared to the rest ... this is because it's GLOBAL_WORLD matrix is not being updated in the shader after the -1 scale is applied to the prop, even when the rest of the props are updated with the correct matrix value.

Any guesses as to why this could be happening or where I should look to investigate further guys? This has me stumped for the last few days even after making what looks like progress on the issue.

from moai-dev.

sshukul avatar sshukul commented on July 30, 2024

I can confirm this issue is somehow fixed in the latest version, closing.

from moai-dev.

sshukul avatar sshukul commented on July 30, 2024

Nope sorry, not fixed, still reproduceable. If someone is willing to look into this I can provide some sample code to reproduce, thanks.

from moai-dev.

sshukul avatar sshukul commented on July 30, 2024

This is finally fixed in Moai 2.0! Will mark as closed once merged into moai-dev.

from moai-dev.

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.