Welcome, Guest.
Username: Password: Remember me

TOPIC: Split screen applied to one specific shader

Split screen applied to one specific shader 2 years 1 month ago #1

Is there any easy way to apply split screen to just one shader for testing purposes. Looking to do this for the new Emboss shader so i can correlate its effects between close objects and distant objects :cheer:
The administrator has disabled public write access.

Split screen applied to one specific shader 2 years 1 month ago #2

I'm very new to using shaders and shader injection, so I could be totally wrong here, but...

Assuming you're using the emboss shader implementation code posted by LuciferHawk on page 7 of the emboss shader thread, you could simply change the Emboss_ToggleKey to use the same toggle key as splitscreen.

That would make it so that if splitscreen is used then emboss is also used. But it would not make it so that the results are of the emboss only if you have other shaders active as well.

If you want to make it so that splitscreen only shows the emboss on one side, and shows the other shaders on the other side, or so it shows original on one side and emboss only on the other regardless of other shaders present, then I think it would require a much larger change to the code for SplitScreen.h. Because right now the SplitScreen.h implementation will only show either full original (RFX_originalColor), or full shaders (RFX_backbufferColor).


In theory, you should I think be able to take the Emboss shader settings, and add them instead to Common_settings.cfg. Then take the Emboss shader float4 PS_Emboss function code and add it into the SpitScreen.h code file. Once you have that in place, you would then add in another pass. The first pass would call the emboss code and pass it to a custom render target (which you would have to add as well), then the second pass would call the splitscreen function code. You would then need to edit the splitscreen function code to return the custom render target texture instead of either RFX_originalColor or RFX_backbufferColor (depending on which side of the screen you want to replace).


All of that's a little messy though.

I'm not clear as to why you would want or need to compare emboss only to all other active shaders minus emboss. Which means it seems more likely to me that you want to compare emboss only with no other shaders active, and compare it to the original image. If that's the case, then all you need to do is create a new preset where the only active shaders are emboss and splitscreen, and load that preset.

Hope that helps,
Drake Phoenix
The administrator has disabled public write access.
The following user(s) said Thank You: Aelius Maximus

Split screen applied to one specific shader 2 years 1 month ago #3

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 840
In the effect ordering, move emboss shader to the very front and splitscreen shader (NOT the SweetFX one) right behind as second shader.
For that to work, make sure not to activate AO or DoF shader cause currently they overwrite any change that happends before them.

Thanks for also looking into this DrakePhoenix :-)
The administrator has disabled public write access.
The following user(s) said Thank You: Aelius Maximus

Split screen applied to one specific shader 2 years 1 month ago #4

LuciferHawk wrote:
In the effect ordering, move emboss shader to the very front and splitscreen shader (NOT the SweetFX one) right behind as second shader.
For that to work, make sure not to activate AO or DoF shader cause currently they overwrite any change that happends before them.

Thanks for also looking into this DrakePhoenix :-)

If you use the effect ordering in that way though, wouldn't other active shaders then take the splitscreen results and apply their effects to the full result, both sides?

I may simply not be understanding how the effect ordering works, but I thought it was a linear procedure. First effect is processed, then next effect processed against results from the first, then next processed against results from the second, and so on through the entire list. Is that incorrect?

That's why I initially didn't suggest doing it that way. Because if that's the way effect ordering works, then what you would get as a result is full shaders less emboss on one side and full shaders including emboss on the other. Which would not provide the sort of test of emboss only, which is what I understood them to be asking for, but rather would be a test of full+emboss vs. full-only. However, that understanding of their request may also be incorrect, and having it compare full with emboss vs. full without emboss may be exactly what they want *shrugs*. If that's what they want, then your method is much better than my messy one :)

Later,
Drake Phoenix
Last Edit: 2 years 1 month ago by DrakePhoenix.
The administrator has disabled public write access.

Split screen applied to one specific shader 2 years 1 month ago #5

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 840
:) correct, I understood Aelius wanted splitscreen applied to only one shader. So as you said, one side full+shaderX and other side full without shaderX. Like a constant toggle difference.

You meant comparing one emboss result with another emboss result?

So we gave actually two different answers which together cover probably the two most likely questions :P great!
The administrator has disabled public write access.