Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelarius committed May 26, 2024
1 parent b5eb625 commit 736c06b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pt/deferred_renderer_resolve_pass.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn fsMain(in: VertexOutput) -> @location(0) vec4f {
let uv = in.texCoord;
let textureIdx = vec2u(floor(uv * uniforms.framebufferSize));
let sampleBufferIdx = textureIdx.y * u32(uniforms.framebufferSize.x) + textureIdx.x;
let sampleBufferElement = sampleBuffer[sampleBufferIdx];
let color = vec3f(sampleBufferElement[0], sampleBufferElement[1], sampleBufferElement[2]);
let sample: array<f32, 3> = sampleBuffer[sampleBufferIdx];
let color = vec3f(sample[0], sample[1], sample[2]);

let rgb = acesFilmic(uniforms.exposure * color);
let srgb = pow(rgb, vec3(1f / 2.2f));
Expand Down
4 changes: 2 additions & 2 deletions src/pt/shader_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,8 @@ fn fsMain(in: VertexOutput) -> @location(0) vec4f {
let uv = in.texCoord;
let textureIdx = vec2u(floor(uv * uniforms.framebufferSize));
let sampleBufferIdx = textureIdx.y * u32(uniforms.framebufferSize.x) + textureIdx.x;
let sampleBufferElement = sampleBuffer[sampleBufferIdx];
let color = vec3f(sampleBufferElement[0], sampleBufferElement[1], sampleBufferElement[2]);
let sample: array<f32, 3> = sampleBuffer[sampleBufferIdx];
let color = vec3f(sample[0], sample[1], sample[2]);
let rgb = acesFilmic(uniforms.exposure * color);
let srgb = pow(rgb, vec3(1f / 2.2f));
Expand Down

0 comments on commit 736c06b

Please sign in to comment.