Page 1 of 1

LUT question

Posted: Tue Sep 22, 2020 12:03 am
by EmperorGrieferus
I am thinking about one thing.
The idea is simple - make the Palette mode in GZDoom 2.4.0 half-transparent.
Is there any way how to do this right in tonemap.fp?
What it should look like: https://drive.google.com/file/d/1QeAf-o ... sp=sharing

09/22: Fixed Doomguy's strange look.

Re: LUT question

Posted: Wed Sep 23, 2020 5:22 pm
by EmperorGrieferus

Re: LUT question

Posted: Fri Sep 25, 2020 9:02 am
by EmperorGrieferus
It's done.
void main()
{
vec3 color = texture(InputTexture, TexCoord).rgb;
vec3 gzdoomcolor = color;
#ifndef PALETTE
float exposureAdjustment = texture(ExposureTexture, vec2(0.5)).x;
color = color * exposureAdjustment;
color = Linear(color); // needed because gzdoom's scene texture is not linear at the moment
#endif
FragColor = vec4(mix( gzdoomcolor, Tonemap(color), 0.5), 1.0);
}

Re: LUT question

Posted: Fri Sep 25, 2020 9:14 am
by EmperorGrieferus
Special thanks to 0xc0de from gamedev.ru for this code.