Giter Site home page Giter Site logo

minko-lighting's People

Stargazers

 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  avatar  avatar

minko-lighting's Issues

Possible not defined property

Hey there,

my build server throws an exception about some possible not defined proeprties in LightController.as:

[compc] D:\TeamCity\buildAgent\work\9dfee1d89e9c245\src\aerys\minko\scene\controller\light\LightController.as(156): Spalte: 18 Fehler: Zugriff auf eine möglicherweise nicht definierte Eigenschaft type über einen Verweis mit statischem Typ aerys.minko.scene.node.light:AbstractLight
[23:21:17][compc]
[23:21:17][compc] return light1.type - light2.type;
[23:21:17][compc] ^
[23:21:17][compc]
[23:21:17][compc] D:\TeamCity\buildAgent\work\9dfee1d89e9c245\src\aerys\minko\scene\controller\light\LightController.as(156): Spalte: 32 Fehler: Zugriff auf eine möglicherweise nicht definierte Eigenschaft type über einen Verweis mit statischem Typ aerys.minko.scene.node.light:AbstractLight
[23:21:17][compc]
[23:21:17][compc] return light1.type - light2.type;
[23:21:17][compc] ^
[23:21:17][compc]
[23:21:17][compc] D:\TeamCity\buildAgent\work\9dfee1d89e9c245\src\aerys\minko\scene\controller\light\LightController.as(45): Spalte: 46 Fehler: Zugriff auf eine möglicherweise nicht definierte Eigenschaft type über einen Verweis mit statischem Typ aerys.minko.scene.node.light:AbstractLight
[23:21:17][compc]
[23:21:17][compc] _lightData.setLightProperty('type', light.type);

Kind Regards
Wolf

Cannot compile because of a few errors

LightingPass.as @ line 224 return Shader.create("lighting pass", clipspacePosition, pixelColor);
LightDepthPath.as @ line 48 return Shader.create("light depth pass", clipspacePosition, pixelColor);

The static function create does not accept 3 parameters.

Problem with lighting

I've experienced some bugs with the lighting in 2.0b.
I have tried to look deeper into the code about what's going on, but not sure - it's a lot of new code to familiarize myself with.

  1. On CubeGeometry geometry (possibly other faceted meshes) the lighting appears to be "stuck" to some of the faces as the mesh is rotated. This might be related to definition of the normals for CubeGeometry.
  2. SphereGeometries and TeapotGeometries (and probably others) seem to be lit from the exact opposite direction from a PointLight. This could be a problem with some math applied in the shaders, perhaps in the LightAwareShaderPart or LightingShaderPart. It is as though instead of some vector being computed as A - B, it is computed as B - A instead.
  3. There's some problem with shadow-casting. It may be related to (2) or not. Certain objects don't cast (or, perhaps, others don't receive?) when shadow casting is defined for all.

I'll leave the example the demonstrates these online at http://algomorph.com/sample, perhaps more can be gleaned from looking at these things than my descriptions.

In the meantime, I'll continue exploring the new minko-collada extension and come back to this later.

DirectionalLight transform

It seems to me that the DirectionalLight transform doesn't work.

_light.transform.setTranslation(0, -100, 0);

In the directional light example, the light source didn't change it's position.
The shadows are on the same wall as before.

Regards!

Custom Normals for EnviromentMapMaterial

Hi,

Check out
https://github.com/aerys/minko-lighting/blob/master/src/aerys/minko/render/shader/part/environment/EnvironmentMappingShaderPart.as#L39

It seems that you use
LightAwareShaderPart's vsWorldNormal to calculate the envmap.

vsWorldNormal = toWorld(vertexAnimationShaderPart.getAnimatedVertexNormal());

So when i want to share a recalculated normal to fragment shader.
I can use the new normal to calculate lights.
But i can't use it to calculate it's envmap.
Because applyEnvironmentMapping() uses vsWorldNormal.
I think a normal:SFloat for applyEnvironmentMapping() would solve this issue.

Thx.

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.