Light pos and color controls

This commit is contained in:
bloeys
2022-12-06 03:48:07 +04:00
parent 653a315631
commit 305982deca
2 changed files with 9 additions and 1 deletions

View File

@ -262,6 +262,14 @@ func (g *OurGame) Update() {
updateViewMat()
}
if imgui.DragFloat3("Light Pos 1", &lightPos1.Data) {
simpleMat.SetUnifVec3("lightPos1", lightPos1)
}
if imgui.DragFloat3("Light Color 1", &lightColor1.Data) {
simpleMat.SetUnifVec3("lightColor1", lightColor1)
}
if input.KeyClicked(sdl.K_F4) {
fmt.Printf("Pos: %s; Forward: %s; |Forward|: %f\n", cam.Pos.String(), cam.Forward.String(), cam.Forward.Mag())
}