Remove assets from repository and download them using xmake

This commit is contained in:
SirLynix
2022-05-27 08:34:36 +02:00
parent 03e2801dbe
commit 5507b98f2f
51 changed files with 189 additions and 313 deletions

49
assets/shaders/gamma.nzsl Normal file
View File

@@ -0,0 +1,49 @@
[nzsl_version("1.0")]
module;
external
{
[binding(0)] colorTexture: sampler2D[f32]
}
struct FragIn
{
[location(0)] uv: vec2[f32]
}
struct FragOut
{
[location(0)] color: vec4[f32]
}
struct VertIn
{
[location(0)] pos: vec2[f32],
[location(1)] uv: vec2[f32]
}
struct VertOut
{
[location(0)] vertUV: vec2[f32],
[builtin(position)] position: vec4[f32]
}
[entry(frag)]
fn main(input: FragIn) -> FragOut
{
let gamma = 2.2;
let output: FragOut;
output.color = colorTexture.Sample(input.uv);
//output.color = pow(colorTexture.Sample(input.uv), vec4[f32](1.0 / gamma, 1.0 / gamma, 1.0 / gamma, 1.0));
return output;
}
[entry(vert)]
fn main(input: VertIn) -> VertOut
{
let output: VertOut;
output.position = vec4[f32](input.pos, 0.0, 1.0);
output.vertUV = input.uv;
return output;
}