26 lines
466 B
Plaintext
26 lines
466 B
Plaintext
[nzsl_version("1.0")]
|
|
module;
|
|
|
|
import VertOut, VertexShader from Engine.FullscreenVertex;
|
|
|
|
external
|
|
{
|
|
[binding(0)] colorTexture: sampler2D[f32]
|
|
}
|
|
|
|
struct FragOut
|
|
{
|
|
[location(0)] color: vec4[f32]
|
|
}
|
|
|
|
[entry(frag)]
|
|
fn main(input: VertOut) -> 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;
|
|
}
|