@@ -10,13 +10,13 @@ use render::{BackendResources, ShadowFormat};
1010
1111/// `ShadowMap` is used to render shadows from [`PointLight`](struct.PointLight.html)
1212/// and [`DirectionalLight`](struct.DirectionalLight.html).
13- #[ derive( Clone , Debug ) ]
13+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
1414pub struct ShadowMap {
1515 pub ( crate ) resource : gfx:: handle:: ShaderResourceView < BackendResources , f32 > ,
1616 pub ( crate ) target : gfx:: handle:: DepthStencilView < BackendResources , ShadowFormat > ,
1717}
1818
19- #[ derive( Clone , Debug ) ]
19+ #[ derive( Clone , Debug , PartialEq ) ]
2020pub ( crate ) enum ShadowProjection {
2121 Orthographic ( Orthographic ) ,
2222}
@@ -33,6 +33,7 @@ impl ShadowMap {
3333
3434/// Omni-directional, fixed-intensity and fixed-color light source that affects
3535/// all objects in the scene equally.
36+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
3637pub struct Ambient {
3738 pub ( crate ) object : Object ,
3839}
@@ -47,6 +48,7 @@ impl Ambient {
4748/// The light source that illuminates all objects equally from a given direction,
4849/// like an area light of infinite size and infinite distance from the scene;
4950/// there is shading, but cannot be any distance falloff.
51+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
5052pub struct Directional {
5153 pub ( crate ) object : Object ,
5254 pub ( crate ) shadow : Option < ShadowMap > ,
@@ -93,6 +95,7 @@ impl Directional {
9395/// takes color of the "ground". In other cases, color is determined as
9496/// interpolation between colors of upper and lower hemispheres, depending on
9597/// how much the normal is oriented to the upper and the lower hemisphere.
98+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
9699pub struct Hemisphere {
97100 pub ( crate ) object : Object ,
98101}
@@ -105,6 +108,7 @@ impl Hemisphere {
105108}
106109
107110/// Light originates from a single point, and spreads outward in all directions.
111+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
108112pub struct Point {
109113 pub ( crate ) object : Object ,
110114}
0 commit comments