mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-17 23:09:40 +01:00
50200262df
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.
13 lines
268 B
GLSL
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;
|
|
};
|