mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 13:11:33 +00:00
specular highlights (blinn-phong)
This commit is contained in:
@ -343,7 +343,11 @@ public class Renderer {
|
||||
assert(instances.count < 28)
|
||||
|
||||
var vertUniforms = VertexShaderUniforms(projView: camera.viewProjection)
|
||||
var fragUniforms = FragmentShaderUniforms(directionalLight: normalize(.init(0.75, -1, 0.5)))
|
||||
var fragUniforms = FragmentShaderUniforms(
|
||||
cameraPosition: camera.position,
|
||||
directionalLight: normalize(.init(0.75, -1, 0.5)),
|
||||
specularColor: SIMD4(Color(rgba8888: 0x7F7F7F00).linear),
|
||||
specularIntensity: 50)
|
||||
let instances = instances.map { (instance: Instance) -> VertexShaderInstance in
|
||||
let model =
|
||||
.translate(instance.position) *
|
||||
|
Reference in New Issue
Block a user