vk: add commented out normal debugging code
This commit is contained in:
parent
f42ea011f1
commit
bdbfbef8a2
|
@ -36,12 +36,14 @@ layout(set = 0, binding = 15, rgba16f) uniform image2D prev_temporal_diffuse;
|
|||
layout(set = 0, binding = 16, rgba16f) uniform image2D out_temporal_specular;
|
||||
layout(set = 0, binding = 17, rgba16f) uniform image2D prev_temporal_specular;
|
||||
|
||||
|
||||
const int INDIRECT_SCALE = 2;
|
||||
|
||||
//#define DEBUG_TEXTURE normals_gs
|
||||
//#define DEBUG_TEXTURE emissive
|
||||
//#define DEBUG_TEXTURE light_point_diffuse
|
||||
//#define DEBUG_NORMAL
|
||||
//layout(set = 0, binding = 18, rgba8) uniform readonly image2D material_rmxx;
|
||||
|
||||
// Blatantly copypasted from https://www.shadertoy.com/view/XsGfWV
|
||||
vec3 aces_tonemap(vec3 color){
|
||||
|
@ -202,7 +204,11 @@ void main() {
|
|||
vec3 geometry_normal, shading_normal;
|
||||
readNormals(pix, geometry_normal, shading_normal);
|
||||
//imageStore(out_dest, pix, vec4(.5 + geometry_normal * .5, 0.)); return;
|
||||
imageStore(out_dest, pix, vec4(.5 + shading_normal * .5, 0.)); return;
|
||||
//const vec4 mat_rmxx = imageLoad(material_rmxx, pix);
|
||||
//imageStore(out_dest, pix, vec4((.5 + shading_normal * .5)*.8 + .2 * mat_rmxx.a , 0.)); return;
|
||||
|
||||
vec3 normal = pix.x < res.x / 2 ? shading_normal : geometry_normal;
|
||||
imageStore(out_dest, pix, vec4(.5 + normal * .5, 0.)); return;
|
||||
#endif
|
||||
|
||||
/* const uint mi = uint(material_index); */
|
||||
|
|
|
@ -8,6 +8,7 @@ layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
|||
|
||||
#include "ray_primary_common.glsl"
|
||||
#include "ray_primary_hit.glsl"
|
||||
//#include "noise.glsl"
|
||||
|
||||
#define RAY_PRIMARY_OUTPUTS(X) \
|
||||
X(10, base_color_a, rgba8) \
|
||||
|
@ -97,8 +98,10 @@ void main() {
|
|||
}
|
||||
|
||||
float L = ray.dist;
|
||||
|
||||
//uint debug_geometry_index = 0;
|
||||
if (rayQueryGetIntersectionTypeEXT(rq, true) == gl_RayQueryCommittedIntersectionTriangleEXT) {
|
||||
//debug_geometry_index = rayQueryGetIntersectionGeometryIndexEXT(rq, true);
|
||||
//debug_geometry_index = rayQueryGetIntersectionPrimitiveIndexEXT(rq, true);
|
||||
primaryRayHit(rq, payload);
|
||||
L = rayQueryGetIntersectionTEXT(rq, true);
|
||||
}
|
||||
|
@ -108,6 +111,7 @@ void main() {
|
|||
imageStore(out_position_t, pix, payload.hit_t);
|
||||
imageStore(out_base_color_a, pix, payload.base_color_a);
|
||||
imageStore(out_normals_gs, pix, payload.normals_gs);
|
||||
//imageStore(out_material_rmxx, pix, vec4(payload.material_rmxx.rg, 0, uintToFloat01(xxhash32(debug_geometry_index))));
|
||||
imageStore(out_material_rmxx, pix, payload.material_rmxx);
|
||||
imageStore(out_emissive, pix, payload.emissive);
|
||||
imageStore(out_geometry_prev_position, pix, payload.prev_pos_t);
|
||||
|
|
Loading…
Reference in New Issue