Giter Site home page Giter Site logo

sphericalharmoniclighting's Introduction

SphericalHarmonicLighting

a project which introduction to SphericalHarmonicLighting in Game using Unity

about project data: I use stanford dragon as model which has 5000 vertecies and 10000 faces. I use some cubemap as light source.

about project operator: you can move mouse to rotate light source and press to backspace to change a light source in run-time. you can change the value of CoffeeSHPath on SHRender1 Component to watch the different about self-shadow and InterReflection.

about project Scripts: coffeeSHIntegrator : these part pre-Compute DiffuseWithShadow-SH Light tranfer Function Integrator. InterReflection : these part pre-Compute InterReflection-SH Light tranfer Function Integrator. LightSHIntegrator : these part pre-Compute Light Source Integrator. SHRender.cs & SHRender.shader : Run-time Render SH with CPU. SHRender1.cs & SHRender1.shader: Run-time Render SH with GPU and ps-part.

about SphericalHarmonicLighting:

you can get more information from my blog:https://blog.csdn.net/qq_33999892/article/details/83862583

##############################

一个用于介绍球谐光照原理的Unity项目。

数据: 模型使用的斯坦福龙,光源是不同的cubemap。

操作: 你可以移动鼠标来移动光源,按下空格切换一个光源。 你可以修改SHRender1 组件下 CoffeeSHPath 的路径 (dragon.txt or dragonInterReflection.txt) 来观看自阴影和内反射的不同。

脚本: coffeeSHIntegrator.cs: 用于Diffuse&自阴影效果的光照传输函数的预计算积分 InterReflection.cs:用于内反射效果的光照传输函数的预计算积分 LightSHIntegrator.cs:用于光源的预计算积分 SHRender:在CPU的SH实时渲染 SHRender1:在GPU端的SH实时渲染

关于球谐光照,你可以获取更多的信息从我的博客:https://blog.csdn.net/qq_33999892/article/details/83862583

sphericalharmoniclighting's People

Contributors

tianyijt avatar

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.