rtx: fix light surfaces bleeding backwards

This commit is contained in:
Ivan 'provod' Avdeev 2021-04-22 10:42:19 -07:00
parent c255041bd9
commit 5b7eaa8e1c
2 changed files with 17 additions and 10 deletions

View File

@ -1,24 +1,26 @@
## 2021-04-19
- [x] rtx: light intensity-based light clusters visibility
- [x] rtx: check multiple variants of texture name (wad and non-wad)
- [x] rtx: rad liquids/xeno/... textures
## 2021-04-22
- [x] rtx: fix backlight glitch
# Next
- [ ] rtx: dynamic surface lights / dynamic light clusters
- [ ] rtx: better light culling: normal, bsp visibility, light volumes and intensity, ...
- [ ] rtx: live rad file reloading (or other solution for tuning lights)
- [ ] rtx: restore studio models
- [ ] rtx: textures
- [ ] rtx: restore dynamic stuff like particles, beams, etc
- [ ] rtx: textures
- [ ] rtx: emissive particles
- [ ] rtx: better random
- [ ] rtx: some studio models have glitchy geometry
- [ ] rtx: simple convolution denoise (bilateral?)
- [ ] rtx: live rad file reloading (or other solution for tuning lights)
- [ ] rtx: map name to rad files mapping
- [ ] water surfaces
- [ ] rtx: better light culling: normal, bsp visibility, light volumes and intensity, ...
- [ ] rtx: dynamic surface lights / dynamic light clusters
- [ ] rtx: cluster dlights
- [ ] rtx: entity lights
- [ ] rtx: light styles
- [ ] rtx: dynamically sized light clusters
Split into 2 buffers:
struct LightCluster { uint16 offset, length; }
uint8_t data[];
# Planned
- [ ] rtx: denoise
@ -204,3 +206,8 @@
## 2021-04-17
- [x] rtx: read rad file data
## 2021-04-19
- [x] rtx: light intensity-based light clusters visibility
- [x] rtx: check multiple variants of texture name (wad and non-wad)
- [x] rtx: rad liquids/xeno/... textures

View File

@ -286,7 +286,7 @@ void main() {
const Kusok kusok = kusochki[kusok_index];
//const uint leaf = kusochki[kusok_index].leaf-1;
//C = fract(pos / 256.); break;
//C = fract(pos / LIGHT_GRID_CELL_SIZE); break;
//C = vec3(hash(float(geom_index)), hash(float(geom_index)+15.43), hash(float(geom_index)+34.));
//C = vec3(hash(float(leaf)), hash(float(leaf)+15.43), hash(float(leaf)+34.));
//C = vec3(hash(float(leaf)), float(kusok.num_surface_lights) / 63., float(kusok.is_emissive));
@ -384,7 +384,7 @@ void main() {
// const vec3 n3 = vertices[vi3].normal;
vec3 light_dir = sample_pos - pos;
if (dot(light_dir, normal) <= 0.) {
if (dot(light_dir, n1) >= 0.) {
//C = vec3(1., 0., 1.);
continue;
}