add color changing
This commit is contained in:
parent
94432b0c0d
commit
210d5078c6
7 changed files with 129 additions and 54 deletions
|
|
@ -32,8 +32,13 @@ pub fn main_vs(
|
|||
}
|
||||
|
||||
#[spirv(fragment)]
|
||||
pub fn main_fs(frag_world_position: Vec3, frag_world_normal: Vec3, out_color: &mut Vec4) {
|
||||
let base_color = Vec3::new(1.0, 0.5, 0.5);
|
||||
pub fn main_fs(
|
||||
frag_world_position: Vec3,
|
||||
frag_world_normal: Vec3,
|
||||
out_color: &mut Vec4,
|
||||
#[spirv(uniform, descriptor_set = 0, binding = 0)] ubo: &UniformBufferObject,
|
||||
) {
|
||||
let base_color = ubo.model_color;
|
||||
let light_pos = Vec3::new(2.0, 2.0, -2.0);
|
||||
|
||||
// Calculate light direction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue