Search code examples
cunity-game-enginemodelcg

Lighting a model (cube,sphere....) in fragment shader cg/Unity


I am beginner at modelling and etc., but I have a school task which I explained in the title and I searched for tutorials and I found many at Unity's page, but I didn't find anything about lighting in fragment shader. Any lead how to start?


Solution

  • I would recommend checking out https://github.com/bkaradzic/bgfx The samples are a great resource to get started.

    If you feel you need to know more about computer graphics, how the pipeline works and some of the math. I would recommend taking this free course https://www.udacity.com/course/cs291