51 lines
802 B
Plaintext
51 lines
802 B
Plaintext
shader Entity {
|
|
constants :: Constant_Buffer {
|
|
model : float4x4;
|
|
projection : float4x4;
|
|
light_view : float4x4;
|
|
|
|
light_dir : float3;
|
|
light_color : float3;
|
|
}
|
|
|
|
Vertex_In :: struct {
|
|
position : float3;
|
|
normal : float3;
|
|
uv : float2;
|
|
}
|
|
|
|
Vertex_Out :: struct {
|
|
position : float4;
|
|
normal : float3;
|
|
uv : float2;
|
|
world_pos : float3;
|
|
}
|
|
|
|
vertex main :: (in : Vertex_In) -> Vertex_Out {
|
|
// Do some stuff here
|
|
}
|
|
|
|
pass : shadow {
|
|
vertex = main;
|
|
pixel :: (in : Vertex_Out) -> float4 {
|
|
// Do some shadow stuff
|
|
}
|
|
}
|
|
|
|
pass : picking {
|
|
vertex = main;
|
|
pixel :: (in : Vertex_Out) -> float4 {
|
|
// Do some picking stuff
|
|
}
|
|
}
|
|
|
|
pass : lighting {
|
|
vertex = main;
|
|
pixel :: (in : Vertex_Out) -> float4 {
|
|
// Do some lighting stuff
|
|
}
|
|
}
|
|
|
|
}
|
|
|