GithubHelp home page GithubHelp logo

codeandweb / cocos2d-x-dynamic-lighting-example Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 28.0 13.4 MB

Cocos2d-x tutorial: Sprite animation with dynamic light using normal maps - SpriteIlluminator

C++ 80.78% GLSL 2.63% Objective-C 2.67% Objective-C++ 13.67% C 0.24%

cocos2d-x-dynamic-lighting-example's People

Contributors

codeandweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocos2d-x-dynamic-lighting-example's Issues

Multiple light sources?

It looks like this only supports one light source out of the box.

Not sure here but if LightEffect::prepareForRender() was rewritten to somehow work with several light positions instead of just one, that could work? Any other pitfalls? Does the shader itself need to be updated?

Does this code still work with Cocos2d-X v3.10?

Hi there, I have revived a project that uses some of your effect sprite classes and I updated it to Cocos2d-x v3.10 but I get a pink screen as soon as the update occurs (I see the scene correctly for a split-second).

Do you know if this is an issue with changes made to Cocos2d-x? Would you be able to update the project to work with v3.10 in order to confirm?

If not, then I will make more effort :) It's just that you know more about this than I do...

EDIT: OK I've disabled the use of the dynamic lighting classes in my game and I still get the pink screen, so this issue is elsewhere, sorry for disturbing you.

iOS Compatibility

Hi @CodeAndWeb:

I'd like to know if this example code works fine with iOS or MAC. I'm seeing on EffectSprite/Effect.h this:

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)

Thanks!

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.