Disable shaders based on current visible colors?

  • Posts: 4
2 years 1 month ago #1 by SirTuttles
Hey there!

I'm not too familiar with how to create shaders nor work with reshade's language. My programming knowledge extends to fairly primitive Python applications B)

I'm tempted to learn HLSL+Reshade as I am really interested in graphics programming in general, but was hoping that I might get a quick answer on something before I delve into all that.

Would it be possible to analyze a rendered image, and based on that, determine whether or not to disable or enable another shader/technique compiled from another file?

For example, In Splinter Cell Chaos Theory, it's possible to get pretty great results from MXAO. Unfortunately the AO doesn't work too well with the EMF vision mode, which only exclusively shows shades of blue and white.

Please Log in or Create an account to join the conversation.

  • Posts: 29
2 years 1 month ago #2 by Androll
Look here, this is closest thing available right now reshade.me/forum/shader-presentation/4024-uidetect

Please Log in or Create an account to join the conversation.

  • Posts: 101
2 years 3 days ago #3 by v00d00m4n
You can try to downsample whole screen buffer to 1x1 pixel (not sure you can do it in reshade) and sample it color every frame, and add few ifs to check if color is in range where green and blue of specific range is dominant color and in this case you can copy original unaltered buffered frame over processed and set this shader last one in order. You can also try without downsampling just by sampling all pixels of screen per frame and count average value of color and check if match range (color may different a little from scene to scene but average range will be same). if I remember correctly chaos theory also had overlay that used to mimic trifocal glasses of Sam, you can sample color at few fixed Coords (just don't set them per pixel, set them as % of screed quarter) where color should always be constant overlay color, this may be bullet proof and easier way to detect vision modes, but it would not work in other parts of series.

Please Log in or Create an account to join the conversation.