forked from amethyst/amethyst
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zenith and Nadir colors now provided as uniform input to fragment shader
- Loading branch information
Showing
4 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
pub use self::interleaved::DrawSkybox; | ||
|
||
use color::Rgba; | ||
|
||
mod interleaved; | ||
|
||
static VERT_SRC: &[u8] = include_bytes!("../shaders/vertex/skybox.glsl"); | ||
static FRAG_SRC: &[u8] = include_bytes!("../shaders/fragment/skybox.glsl"); | ||
|
||
#[derive(Clone, Debug, Serialize, Deserialize)] | ||
pub struct SkyboxColor { | ||
pub zenith: Rgba, | ||
pub nadir: Rgba, | ||
} | ||
|
||
impl Default for SkyboxColor { | ||
fn default() -> SkyboxColor { | ||
SkyboxColor { | ||
zenith: Rgba(0.75, 1.0, 1.0, 1.0), | ||
nadir: Rgba(0.1, 0.3, 0.35, 1.0), | ||
} | ||
} | ||
} |