[Question] Shader modding

I suspect this is something only @BitVenom could answer, and the silence of late is discouraging on that front, but I’ll ask anyway and hope.

I want to modify the engine trail shader to use team and stripe colors differently from how it does currently. I’ve identified the shaders that control it, fx_eng_glowbasic, and through editing the various files there I can break the trail behavior in visible and controllable ways, so I am confident I’m barking up the right tree there. Unfortunately, I can’t figure out how to make the stripe color available, if it’s possible at all. Attempting to graft in the code that appears to feed T/S colors to sob_ship results in either no colors, or only default colors that don’t respond to the player settings at all. It seems possible that the inTexTeam input, being a texture rather than a float4, holds both colors, but if so it’s opaque to me and I’m not familiar enough with shader language to tease it out.

If it is possible to make stripe color available to trails, an example as simple as substituting stripe in where the current team color is used seems like it’d likely be enough to get me started.

A more advanced wish if the above is all possible: At present it doesn’t look like we could have different stripe textures use different shaders. That seems like it’d be desirable if mods started getting fancy, especially since a lot of the recent mod architecture changes seem geared towards letting mods run concurrently. If two mods use trails designed for different shaders, the results could be ugly.

I’ll do some searching on this front as well, as it’s applicable to my hope for a tri color shader.

Edit: Hm, I forgot how outclassed I am when it comes to confronting this stuff. You already looked at these didn’t you?

alias	SOB_teamCol		inColTeam
alias	SOB_stripeCol	inColStripe
1 Like

yeah, I made a few attempts at pasting those in a few different places. Didn’t get me anywhere, but I’m fumbling in the dark here too, so it’s possible you’d stumble across something I wouldn’t.