LUT question

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

LUT question

Postby EmperorGrieferus » Tue Sep 22, 2020 12:03 am

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.
EmperorGrieferus
 
Joined: 31 May 2017

Re: LUT question

Postby EmperorGrieferus » Wed Sep 23, 2020 5:22 pm

EmperorGrieferus
 
Joined: 31 May 2017

Re: LUT question

Postby EmperorGrieferus » Fri Sep 25, 2020 9:02 am

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);
}
EmperorGrieferus
 
Joined: 31 May 2017

Re: LUT question

Postby EmperorGrieferus » Fri Sep 25, 2020 9:14 am

Special thanks to 0xc0de from gamedev.ru for this code.
EmperorGrieferus
 
Joined: 31 May 2017


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests