Giter VIP home page Giter VIP logo

Comments (6)

raysan5 avatar raysan5 commented on May 17, 2024

Implemented in commit c9d22c7

Still some work required to improve new struct Material usage...

from raylib.

raysan5 avatar raysan5 commented on May 17, 2024

Directly related to issue #96

from raylib.

victorfisac avatar victorfisac commented on May 17, 2024

Standard Material/Lighting system update 01: c60cc9e
Standard Material/Lighting system update 02: 80eb4f3

from raylib.

victorfisac avatar victorfisac commented on May 17, 2024

Answering 9811a37 commit description: "It seems there are some problems with DrawLights()"

I think DrawLights() is correct. It draws:

  • Point light: sphere wires.
  • Directional light: it draws a sphere wire in its position and cube wires in target position. To set up a directional light, you just have to set up the direction vector that uses the standard shader by subtract target - position (it's the same position(0, 0, 0) target(0, 1, 0) than position (1, 1, 1,) target (1, 2, 1))... I used that way because I think is more simple and visually easy to understand light parameters (and 3D Max uses that way).
  • Spot light: it draws a cone in its position (axis oriented) and a cube wires in target position....

So, I didn't see any problem in DrawLights().

But, I have seen another problem... Sometimes, if I move the lights variables definitions to a different order (using current order of the example works fine), there is a light that is not sent to shader or something because you cannot see its effect in the model. I don't know where is the issue: CreateLight() or SetShaderLights()...

I will review it before adding shader maps feature.

from raylib.

raysan5 avatar raysan5 commented on May 17, 2024

Closed by pull request 4b93349

Many thanks to @victorfisac for his amazing work!

from raylib.

victorfisac avatar victorfisac commented on May 17, 2024

You are welcome @raysan5 . It will be improved over time.

from raylib.

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.