DragoniteSpam-GameMaker-Tutorials / 3DTutorial22FragmentShaderLighting

So far, all of my shader code has been written in the vertex shader. However, with just a few extra steps you can also do it in the fragment shader - and since each fragment's light can be calculated individually. You get a higher degree of precision overall by doing this, and smooth shading in particular will look much better!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3D in Game Maker Studio 2 - Lighting in the Fragment Shader

So far, all of my shader code has been written in the vertex shader. However, with just a few extra steps you can also do it in the fragment shader - and since each fragment's light can be calculated individually. You get a higher degree of precision overall by doing this, and smooth shading in particular will look much better!

Video tutorial:

YouTube

About

So far, all of my shader code has been written in the vertex shader. However, with just a few extra steps you can also do it in the fragment shader - and since each fragment's light can be calculated individually. You get a higher degree of precision overall by doing this, and smooth shading in particular will look much better!


Languages

Language:Game Maker Language 95.9%Language:GLSL 4.1%