File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ insula::shadow::object::update(
85
85
time_delta const delta)
86
86
{
87
87
sun_angle_ += delta / 2 ;
88
- if (sun_angle_ >= fcppt::math::pi <graphics::scalar>())
89
- sun_angle_ = -fcppt::math::pi <graphics::scalar>();
88
+ if (sun_angle_ >= fcppt::math::pi <graphics::scalar>()/ 2 )
89
+ sun_angle_ = -fcppt::math::pi <graphics::scalar>()/ 2 ;
90
90
update_signal_ (
91
91
sun_angle_,
92
92
gizmo ());
@@ -128,7 +128,7 @@ insula::shadow::object::gizmo() const
128
128
return
129
129
graphics::gizmo (
130
130
graphics::gizmo::init ()
131
- .position (base_position_ + position)
131
+ .position (base_position_ - position)
132
132
.forward (forward)
133
133
.up (up)
134
134
.right (right));
Original file line number Diff line number Diff line change @@ -307,15 +307,17 @@ insula::skydome::object::render(
307
307
308
308
void
309
309
insula::skydome::object::shadow_update (
310
- graphics::scalar,
311
- graphics::gizmo const &sun_gizmo )
310
+ graphics::scalar const angle ,
311
+ graphics::gizmo const &)
312
312
{
313
313
sge::renderer::glsl::scoped_program scoped_shader_ (
314
314
renderer_,
315
315
shader_.program ());
316
316
317
317
shader_.set_uniform (
318
318
" sun_position" ,
319
- fcppt::math::vector::normalize (
320
- sun_gizmo.position ()));
319
+ math::sphere_point (
320
+ static_cast <graphics::scalar>(1 ),
321
+ angle,
322
+ static_cast <graphics::scalar>(0 )));
321
323
}
Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ insula::states::freelook::react(
85
85
context<game_inner>().react (
86
86
t);
87
87
88
- /*
88
+ /*
89
89
context<machine>().camera().gizmo() =
90
90
context<game_outer>().shadow_object().gizmo();
91
- */
91
+ */
92
92
93
93
return discard_event ();
94
94
}
You can’t perform that action at this time.
0 commit comments