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
}
}
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 accountSign in
Already have an account? Sign in here.
Sign In Now