xash3d-fwgs/ref_vk/shaders/ray_common.glsl
Ivan 'provod' Avdeev 50200262df rtx: slightly improve black outlines on studio models (see #48)
The core of the issue is that there are backfacing interpolated normals, NdotL and/or NdotV end up being negative for them.
Things we tried:
1. Explicitly using geometry normals for some things. Doesn't really work that well.
2. Clamping NdotX to some small value instead of just ignoring light contribution. Works better, but there are still some artifacts.
2021-09-14 17:47:05 -07:00

13 lines
268 B
GLSL

#extension GL_EXT_ray_tracing: require
struct RayPayload {
float t_offset, pixel_cone_spread_angle;
vec4 hit_pos_t;
vec3 normal;
vec3 geometry_normal;
vec3 base_color;
float reflection;
vec3 emissive;
float roughness;
int kusok_index;
};