Comments (4)
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.
I can confirm this issue is somehow fixed in the latest version, closing.
from moai-dev.
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.
This is finally fixed in Moai 2.0! Will mark as closed once merged into moai-dev.
from moai-dev.
Related Issues (20)
- moaiutil localize command HOT 1
- MOAIGfxDevice.setPointSize has been removed. HOT 1
- Pito builds doxygen documentation incorrectly. HOT 1
- Readme on develop is horribly out of date HOT 2
- Create IDE Projects - iOS (File not found) HOT 4
- I can't release app on Google Play, need to update LibPNG and OpenSSL libraries HOT 10
- Where can i found this? HOT 8
- Build help!! HOT 1
- Enable CI again HOT 1
- MOAI 2.0 - Samples are out of date
- MOAI 2.0 - Sample Browser
- MOAI 2.0 - pito thorns
- MOAI 2.0 - Documentation updates, CHANGELOG.md, etc.
- Website is down. HOT 1
- Linux build fails (and how to somehow fix it) HOT 2
- Update moaiwebsite.github.io HOT 1
- Build broken on Windows 10 using CMake
- inbox
- crushes on android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moai-dev.