Feat: add support for advanced lighting and shadows #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR:
MeshPhongShader
, which means that the Terrain now behaves as any other mesh in the scene: it reacts to scene lights, has support for specularity etc.Here is an illustration of the terrain casting and receiving shadows:
![image](https://private-user-images.githubusercontent.com/22922087/318444947-759b937e-b000-48b4-990b-1d0885423a02.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0ODIzNjAsIm5iZiI6MTczOTQ4MjA2MCwicGF0aCI6Ii8yMjkyMjA4Ny8zMTg0NDQ5NDctNzU5YjkzN2UtYjAwMC00OGI0LTk5MGItMWQwODg1NDIzYTAyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDIxMjc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIwODlmODVkYzljZmMxZTg4MDgwNDE1NjI1YWM1OGIzMjE0MGIwMGI1MDk5ZTAwMjViN2U3YjdkNDc0OGQ5NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ipDKc7m7xhsIfCcNpkwjYSDodvoHVVjSbwWNaOsxtT8)