Remove assets from repository and download them using xmake
This commit is contained in:
47
assets/shaders/deferred_vert.nzsl
Normal file
47
assets/shaders/deferred_vert.nzsl
Normal file
@@ -0,0 +1,47 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
import Engine.InstanceData;
|
||||
import Engine.ViewerData;
|
||||
|
||||
[layout(std140)]
|
||||
struct BasicSettings
|
||||
{
|
||||
AlphaThreshold: f32,
|
||||
DiffuseColor: vec4[f32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[binding(0)] settings: uniform[BasicSettings],
|
||||
[binding(4)] instanceData: uniform[InstanceData],
|
||||
[binding(5)] viewerData: uniform[ViewerData],
|
||||
}
|
||||
|
||||
struct InputData
|
||||
{
|
||||
[location(0)] pos: vec3[f32],
|
||||
[location(1)] normal: vec3[f32],
|
||||
[location(2)] uv: vec2[f32]
|
||||
}
|
||||
|
||||
struct OutputData
|
||||
{
|
||||
[location(0)] normal: vec3[f32],
|
||||
[location(1)] uv: vec2[f32],
|
||||
[location(2)] pos: vec3[f32],
|
||||
[builtin(position)] position: vec4[f32]
|
||||
}
|
||||
|
||||
[entry(vert)]
|
||||
fn main(input: InputData) -> OutputData
|
||||
{
|
||||
let worldPos = instanceData.worldMatrix * vec4[f32](input.pos, 1.0);
|
||||
|
||||
let output: OutputData;
|
||||
output.uv = input.uv;
|
||||
output.normal = input.normal;
|
||||
output.pos = worldPos.xyz;
|
||||
output.position = viewerData.viewProjMatrix * instanceData.worldMatrix * vec4[f32](input.pos, 1.0);
|
||||
return output;
|
||||
}
|
||||
Reference in New Issue
Block a user