Your ROOT_URL in app.ini is https://git.mitchellhansen.info/ but you are visiting https://mitchellhansen.com/mitchellhansen/minimum-viable-game-engine/commit/e376241aaea21e2c332dcecd6304d2d7c5d373a6?style=split&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
18 additions and
8 deletions
@ -42,5 +42,15 @@ mesh = "light.obj"
[ entities . position ]
[ entities . position ]
x = 25.0
x = 25.0
y = 25.0
y = 75.0
z = 20.0
[ [ entities ] ]
name = "light.2"
type = "Light"
mesh = "light.obj"
[ entities . position ]
x = 50.0
y = 75.0
z = 20.0
z = 20.0
@ -33,7 +33,7 @@ impl DirectionalLight {
let point3d = Point3 ::new ( pos . x , pos . y , pos . z ) ;
let point3d = Point3 ::new ( pos . x , pos . y , pos . z ) ;
let point3d_2 = Point3 ::new ( pos . x , pos . y - 1.0 , pos . z ) ;
let point3d_2 = Point3 ::new ( pos . x , pos . y - 1.0 , pos . z ) ;
let mx_view = Matrix4 ::look_at ( point3d , point3d_2 , Vector3 ::unit_ y ( ) ) ;
let mx_view = Matrix4 ::look_at ( point3d , point3d_2 , Vector3 ::unit_ z ( ) ) ;
let projection = PerspectiveFov {
let projection = PerspectiveFov {
fovy : Deg ( self . fov ) . into ( ) ,
fovy : Deg ( self . fov ) . into ( ) ,
@ -74,8 +74,8 @@ impl RenderState {
const MAX_LIGHTS : usize = 10 ;
const MAX_LIGHTS : usize = 10 ;
const SHADOW_FORMAT : wgpu ::TextureFormat = wgpu ::TextureFormat ::Depth32Float ;
const SHADOW_FORMAT : wgpu ::TextureFormat = wgpu ::TextureFormat ::Depth32Float ;
const SHADOW_SIZE : wgpu ::Extent3d = wgpu ::Extent3d {
const SHADOW_SIZE : wgpu ::Extent3d = wgpu ::Extent3d {
width : 5 12,
width : 10 24 ,
height : 5 12,
height : 10 24 ,
depth : Self ::MAX_LIGHTS as u32 ,
depth : Self ::MAX_LIGHTS as u32 ,
} ;
} ;
const DEPTH_FORMAT : wgpu ::TextureFormat = wgpu ::TextureFormat ::Depth32Float ;
const DEPTH_FORMAT : wgpu ::TextureFormat = wgpu ::TextureFormat ::Depth32Float ;
@ -196,10 +196,10 @@ impl RenderState {
b : 0.5 ,
b : 0.5 ,
a : 1.0 ,
a : 1.0 ,
} ,
} ,
fov : 45 .0,
fov : 90 .0,
depth : RangeCopy {
depth : RangeCopy {
start : 1.0 ,
start : 1.0 ,
end : 20 .0,
end : 20 0 .0,
} ,
} ,
target_view : target . clone ( ) ,
target_view : target . clone ( ) ,
}
}
@ -149,8 +149,8 @@ pub fn runtime_spawn(
y : position . y ,
y : position . y ,
z : position . z ,
z : position . z ,
} ,
} ,
yaw : Rad ( - PI ) ,
yaw : Rad ( PI / 2.0 ) ,
pitch : Rad ( PI / 2.0 ) ,
pitch : Rad ( PI / 2.0 + 25.0 ) ,
} ,
} ,
CameraController ::new ( 5.0 , 1.0 ) ,
CameraController ::new ( 5.0 , 1.0 ) ,
) ) ;
) ) ;