rt: fixup additive color

This commit is contained in:
Ivan 'provod' Avdeev 2023-02-03 12:00:29 -08:00
parent de6da4f03f
commit 51641234ab

View File

@ -37,9 +37,8 @@ vec3 traceAdditive(vec3 pos, vec3 dir, float L) {
const MiniGeometry geom = readCandidateMiniGeometry(rq);
const uint tex_base_color = getKusok(geom.kusok_index).tex_base_color;
const vec4 texture_color = texture(textures[nonuniformEXT(tex_base_color)], geom.uv);
const vec4 kusok_color = getKusok(geom.kusok_index).color;
const vec3 color = texture_color.rgb * kusok_color.rgb * texture_color.a; // * kusok_color.a;
//const vec3 color = texture_color.rgb * kusok_color.rgb * texture_color.a * kusok_color.a;
const vec3 kusok_emissive = getKusok(geom.kusok_index).emissive;
const vec3 color = texture_color.rgb * kusok_emissive * texture_color.a; // * kusok_color.a;
const float hit_t = rayQueryGetIntersectionTEXT(rq, false);
const float overshoot = hit_t - L;