Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

New shader keywords


SomaZ

Hello all,

here is a list of all the new shader stage keywords and what they are for.

// a single value representing the specular level
// non metallic surface values range between 0.04 and 0.08
// which translates to 4% to 8% reflectance
// metallic surfaces have higher reflectance
// this value is in linear space in range [0.0, 1.0]
specularReflectance <value>

// sets the stages gloss value in range [0.0, 1.0]
// 1.0 beeing a perfect mirror and  0.0 beeing a very very dull rock
gloss <value>

// the same as gloss, but reversed, pick what you like better
// roughness = 1.0 - gloss
// value is also in range [0.0, 1.0]
roughness <value>
  
// controlls the depth of the parallax correction when a
// normalHeightMap is supplied to the stage
// value is also in range [0.0, 1.0]
parallaxDepth <value>

// shifts your parallax correction out of the surface
// helps with floor materials creating gaps between floor and walls
// value is in range [0.0, 1.0]
// can be forced on all surfaces for testing purposes
// with r_forceParallaxBias when cheats are enabled
parallaxBias <value>

// scales the values of the supplied normalMap
// can flip normalmaps green channel so you can use opengl format normal maps too
// eg. normalScale 1.0 -1.0
// height value overwrites parallaxDepth when normalScale is written after parallaxDepth
normalScale <xy>
or normalScale <x> <y>
or normalScale <x> <y> <height>

// r, g and b values are specularReflectance of the surface
// gloss is gloss obviously
// overwrites specularReflectance, gloss or roughness if written after those keywords
specularScale <rgb> <gloss>
or specularScale <r> <g> <b>
or specularScale <r> <g> <b> <gloss>
  
// sets a stages normal map or a normal map with a height map in the alpha channel
// for parallax mapping
normalMap <name> 
or normalHeightMap <name>

// sets a stages specular gloss map
// must have a gloss map in the alpha channel, else the material will always be mirror like
specMap <name>
or specularMap <name>

// RMO packed material map (must have same image dimensions as the map provided)
// <red channel> roughness map
// <green channel> metalness map
// <blue channel> occlusion map
// <alpha channel> specular scale map (only when using rmosMap)
rmoMap <name>
or rmosMap <name>
  
// ORM packed material map (must have same image dimensions as the map provided)
// <red channel> occlusion map
// <green channel> roughness map
// <blue channel> metalness map
// <alpha channel> specular scale map (only when using ormsMap)
ormMap <name>
or ormsMap <name>
  
// MOXR packed material map (must have same image dimensions as the map provided)
// <red channel> metalness map
// <green channel> occlusion map
// <blue channel> specular scale map (only when using mosrMap)
// <alpha channel> roughness map
moxrMap <name>
or mosrMap <name>
  
// change the stages BRDF to look more like fabrics
// just need to provide the keyword like glow or detail
cloth

 

Here is a simple example of a gold shader that doesn't use any texture:

textures/rend2/Gold
{
	{
		map $lightmap
	}
	{
		map $whiteimage
		specMap $whiteimage
		rgbGen const ( 0.0 0.0 0.0 )
		specularScale 0.8 0.466807 0.254887
		roughness 0.5
		blendfunc GL_DST_COLOR GL_ZERO
	}
}
Mandalorian, mjt, Lwkill and 2 others like this

User Feedback

Recommended Comments

There are no comments to display.



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