Jump to content

Recommended Posts

I have an item in my mod that, bypassing it's weird quirks and mechanics, essentially functions as nightvision goggles, so I decided to give the screen a green tint when it's in use, which I successfully managed to do by converting textures from the base game, modifying and converting them back, though it was a weird process.

The process was quite clunky actually, and along with the game crashing if I did anything remotely incorrect, are making and using my own colour cubes the best way to do simple color correction, or is there something simple I can do with the post processing system that would make this a lot simpler?

With the PostProcessor being able to use custom shaders, you could technically re-create the colourcube effect in a simple to make fragment shader.

But, the game already runs the colourcube shader so having two running back to back is a bit inefficient of resources.  A colourcube takes an input colour and rescales it based on a texture lookup as a reference table and interpolating between all of the values it can't explicitly get at.

You can read up more on the PostProcessor here: 

Yeah the engine doesn't handle GPU-related asset errors gracefully, and most of the time it doesn't even tell you what went wrong if it did go wrong.  Not much we can do on our end, this is solely C-side handling issue that Klei would have to address.

Me, personally, I'd do a colourcube so I wouldn't have to worry about the shader failing to compile on some setups due to limited GPU VRAM, registers, extensions, etc.  That could be more of a hassle to debug than the up-front costs of trying to make your own cube.

 

Edited by CarlZalph
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...