+ | Pixelisation problem fixed

This commit is contained in:
TheRedShip
2025-01-11 14:22:46 +01:00
parent 9e3998a9cb
commit bb56f096c8
3 changed files with 4 additions and 6 deletions

View File

@ -80,5 +80,6 @@
"xlocmon": "cpp", "xlocmon": "cpp",
"xloctime": "cpp", "xloctime": "cpp",
"xtree": "cpp" "xtree": "cpp"
} },
"cmake.ignoreCMakeListsMissing": true
} }

View File

@ -1,4 +1,4 @@
CAM 1.43879 3.42554 1.94198 -44.6001 -139.599 0.2 4 90 5 CAM 1.43879 3.42554 1.94198 -44.6001 -139.599 0 4 90 5
MAT 200 200 200 0.0 0.0 0.0 //white MAT 200 200 200 0.0 0.0 0.0 //white

View File

@ -151,7 +151,7 @@ vec3 pathtrace(Ray ray, inout uint rng_state)
hitInfo hit = traceRay(ray); hitInfo hit = traceRay(ray);
if (hit.obj_index == -1) if (hit.obj_index == -1)
{ {
// light += GetEnvironmentLight(ray); light += GetEnvironmentLight(ray);
// light += vec3(135 / 255.0f, 206 / 255.0f, 235 / 255.0f); //ambient color // light += vec3(135 / 255.0f, 206 / 255.0f, 235 / 255.0f); //ambient color
break; break;
} }
@ -209,10 +209,7 @@ void main()
return; return;
if (u_pixelisation != 1 && (uint(pixel_coords.x) % u_pixelisation != 0 || uint(pixel_coords.y) % u_pixelisation != 0)) if (u_pixelisation != 1 && (uint(pixel_coords.x) % u_pixelisation != 0 || uint(pixel_coords.y) % u_pixelisation != 0))
{
imageStore(accumulation_image, pixel_coords, vec4(0.0));
return; return;
}
uint rng_state = uint(u_resolution.x) * uint(pixel_coords.y) + uint(pixel_coords.x); uint rng_state = uint(u_resolution.x) * uint(pixel_coords.y) + uint(pixel_coords.x);
rng_state = rng_state + u_frameCount * 719393; rng_state = rng_state + u_frameCount * 719393;