Giter Site home page Giter Site logo

ShaderPart.reflect function about minko HOT 6 CLOSED

aerys avatar aerys commented on July 19, 2024
ShaderPart.reflect function

from minko.

Comments (6)

Harmek avatar Harmek commented on July 19, 2024

Hi @sindney ,
Wolfram will explain it better than me, but the formula seems correct.
Do you have a case where it causes you trouble?

from minko.

JMLX42 avatar JMLX42 commented on July 19, 2024

I think we're using this method for both environment mapping and specular lighting. And we didn't have any issue so far and the formula is pretty much exactly what Wolfram suggest as Harmek pointed out :)

Can you please elaborate on the issue you encounter?
Do you have some screenshots, videos or app. that could demonstrate the issue?

from minko.

makc avatar makc commented on July 19, 2024

@sindney

r = 2_(n_l)*n - l,

if you dot this by n you get r_n = 2(n_l)_1 - (n_l) = n*l which means both r and l point in the same direction - and in case of reflection this should be the opposite.

from minko.

JMLX42 avatar JMLX42 commented on July 19, 2024

@makc that's a very elegant demonstration :)
@sindney I'll close the issue for now, please feel free to re-open it or fill a new one if you have more inputs on your problem

from minko.

sindney avatar sindney commented on July 19, 2024

@promethe42 @Harmek @makc Wait wait, check this out. http://postimage.org/image/xcqbva17f/

from minko.

sindney avatar sindney commented on July 19, 2024

@promethe42 @Harmek @makc Oh, i get it, our desired reflect result wasn't the same. http://postimage.org/image/bjoar1zl3/

from minko.

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.