- fix some postprocess bugs

This commit is contained in:
Magnus Norddahl 2018-06-30 16:44:09 +02:00
parent ba09af7cbb
commit 8eb825e25a
3 changed files with 4 additions and 4 deletions

View file

@ -902,7 +902,7 @@ void FGLRenderBuffers::RenderEffect(const FString &name)
GLTextureFBs[step.Output.Texture].Bind(); GLTextureFBs[step.Output.Texture].Bind();
break; break;
case PPTextureType::SceneNormal: case PPTextureType::SceneColor:
BindSceneFB(false); BindSceneFB(false);
break; break;
} }

View file

@ -15,6 +15,7 @@ Postprocess::Postprocess()
Managers.Push(new PPCameraExposure()); Managers.Push(new PPCameraExposure());
Managers.Push(new PPColormap()); Managers.Push(new PPColormap());
Managers.Push(new PPTonemap()); Managers.Push(new PPTonemap());
Managers.Push(new PPAmbientOcclusion());
} }
Postprocess::~Postprocess() Postprocess::~Postprocess()

View file

@ -68,12 +68,11 @@ layout(binding=1) uniform sampler2D PaletteLUT;
vec3 Tonemap(vec3 color) vec3 Tonemap(vec3 color)
{ {
/*ivec3 c = ivec3(clamp(color.rgb, vec3(0.0), vec3(1.0)) * 63.0 + 0.5); ivec3 c = ivec3(clamp(color.rgb, vec3(0.0), vec3(1.0)) * 63.0 + 0.5);
int index = (c.r * 64 + c.g) * 64 + c.b; int index = (c.r * 64 + c.g) * 64 + c.b;
int tx = index % 512; int tx = index % 512;
int ty = index / 512; int ty = index / 512;
return texelFetch(PaletteLUT, ivec2(tx, ty), 0).rgb;*/ return texelFetch(PaletteLUT, ivec2(tx, ty), 0).rgb;
return texture(PaletteLUT, TexCoord).rgb;
} }
#else #else