Jump to content

A few questions about shaders


Go to solution Solved by mjt,

Recommended Posts

The best way to learn shaders (or modding in general) is to find something someone else has made and see how they did it. The Shadow troooper stealth effect in JK2 is close to what you're looking for, which is the same as the saboteur stealth effect in JKA. It's called "cloakedShader" found in effects.shader.

Vermillion likes this
Link to comment
24 minutes ago, Circa said:

The best way to learn shaders (or modding in general) is to find something someone else has made and see how they did it. The Shadow troooper stealth effect in JK2 is close to what you're looking for, which is the same as the saboteur stealth effect in JKA. It's called "cloakedShader" found in effects.shader.

Thx for the quick answer! I checked both: in JO Shadow Troopers stealth effect is different - he's just transparent with some strange highlights; in JA Saboteur have 2 effects when he's hiding - first same as Shadow Trooper, but in few seconds he becomes completele invisible with displaement - exactle what i've needed!

I've found Shadow Trooper stealth effect ("cloakedShader" in assets1.pk3/shaders/effects.shader)

spacer.png

but can't find displacement effect anywhere

spacer.png

Can you point where I should search for it?

Link to comment
21 minutes ago, AshuraDX said:

The displacement you see is a hardcoded effect which you can not access through conventional material definitions in .shader files.

Kinda throws my comment out the window then. 😅 Maybe the effect can be replicated via custom shader?

Link to comment
On 9/23/2022 at 4:09 PM, Circa said:

Maybe the effect can be replicated via custom shader?

The effect works by taking a snapshot of whats rendered behind it and transforming those pixels by modifying scale and translation slightly.

This can not be replicated with the tools we have in vanilla jka. A modded renderer could probably expose the effect to the materrial system but that seems like a lot of work. @SomaZ should be able to elaborate on that.

20 hours ago, Vermillion said:

Is there any way to apply this hardcoded effect on a custom model? 

Not without making a fork of OpenJK, adding in your changes and compiling a custom version of the game executable that way I'm afraid.

Vermillion likes this
Link to comment
  • 3 weeks later...
  • Solution
On 9/23/2022 at 8:29 PM, Vermillion said:

Is there any way to apply this hardcoded effect on a custom model? 

Well you can check out the saboteur NPC and assign a different model to it, see if the stealth still works on it - from there on out you could make any kind of NPC as long as the class is what makes it cloak...

Link to comment

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...