forked from NVIDIA/Q2RTX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
path_tracer.rchit
44 lines (33 loc) · 1.38 KB
/
path_tracer.rchit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Copyright (C) 2018 Christoph Schied
Copyright (C) 2019, NVIDIA CORPORATION. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#version 460
#extension GL_GOOGLE_include_directive : enable
#include "path_tracer.h"
#include "utils.glsl"
#define GLOBAL_TEXTURES_DESC_SET_IDX 2
#include "global_textures.h"
#define VERTEX_BUFFER_DESC_SET_IDX 3
#define VERTEX_READONLY 1
#include "vertex_buffer.h"
#include "path_tracer_transparency.glsl"
#include "path_tracer_hit_shaders.h"
layout (location = RT_PAYLOAD_GEOMETRY) rayPayloadInEXT RayPayloadGeometry ray_payload;
hitAttributeEXT vec2 hit_attribs;
void
main()
{
pt_logic_rchit(ray_payload, gl_PrimitiveID, gl_InstanceID, gl_GeometryIndexEXT, gl_InstanceCustomIndexEXT, gl_HitTEXT, hit_attribs.xy);
}