Jump to content

rend2 shader manual


eezstreet

Recommended Posts

Posted

This is more for my purposes than for anything else. Looking up the different shader stages in order to get a good tech demo worked on.

 

 

Shaders can be in either .shader or in .mtr.

 

 

Most of the original keywords still apply, with some differences.

 

Base shader data:

 

 

sun

This keyword has been removed (see below)

 

 

q3map_sun/q3map_sunext <R> <G> <B> <Pitch> <Yaw> <Roll>

Equivalent to sun.

 

 

q3gl2_sun <R> <G> <B> <Pitch> <Yaw> <Roll> <Light Scale> <Shadow Scale>

Altered sun shader. Has advanced shadow casting.

 

 

q3gl2_tonemap <R> <G> <B> <Exposure Min> <Exposure Max>

Use tonemaps? (not sure how this works)

 

 

 

Stage data:

 

 

map <blah>

This has an extra reserved keyword: $deluxemap

 

 

stage <blah>

This is a new keyword. The parameter can be one of the following:

diffuseMap

normalMap/bumpMap (identical in function)

normalParallaxMap/bumpParallaxMap (identical in function)

specularMap

 

 

specularReflectance <value>

For a specular stage, specifies how much reflectance there is

 

 

specularExponent <value>

For a specular stage, specifies the exponent for the glossiness

 

 

gloss <value>

For a specular stage, specifies how much glossiness there is

 

 

rgbGen

lightingDiffuseEntity now works correctly.

 

 

alphaGen

dot/oneMinusDot no longer works.

 

 

glow

This keyword no longer functions.

 

 

surfaceSprites

This keyword no longer functions. (for now)

 

 

Posted

Regarding levels. I can get models in ioquake3 to show off normal mapping in existing maps but when I try it on a wall texture, it just disappears so not sure what's going on there.

 

I can't seem to get a dynamic sun working either with the info ioquake3 provided. :\

  • 3 months later...
Posted

Didn't even know this thread existed :P Dynamic glow will be added back in at some point (keep in mind rend2 is heavily WIP still). Bloom doesn't exist in rend2, but I plan on adding it some way down the line.

Posted

Yeah, cool. I think a shader manual for rend2 is a VERY good idea as I have no idea how to use any new shader commands aside from the normalmap ones. For example, cubemaps, distortion shaders e.t.c

 

Also, when it says..."alpha channel" for normalparralaxmaps....how does that work exactly?

Posted

@@Szico VII

 

You can enable HDR and control tonemapping for your level, though I think HDR might be a bit buggy atm?

 

You should make a map with ioquake3 rend2, then port it to JKA to help Xycaleth with making sure all features are in. I was doing this, but I'm busy with DF2 & JK2:HD and you're more capable. :P

Posted

There's some stuff even in ioquake3 rend2 which need to be implemented (there's no bloom, cubemaps are WIP, there's some shader optimizations that need to take place, etc), as well as stuff which I'd like to see done (motion blur, LUT color grading, etc).

for right now, rend2 doesn't really offer any significant benefit but it will later down the line. The biggest priorities are to improve performance and stability more than adding these features.

Stoiss and Futuza like this
  • 3 weeks later...
Posted

There's cubemaps available now in OpenJK rend2, but not sure how well they work. From what I can tell in the code, it uses tcgen environment in the .shader/.mtr and you place misc_cubemap entities in your map.

 

 

New shader stuff in ioquake3's rend2:

 

normalScale <x> <y>

 

- State the X and Y scales of the normal map.  This is useful for increasing

  or decreasing the "strength" of the normal map, or entering negative values

  to flip the X and/or Y values.  Default 1 1.

 

 

parallaxDepth <value>

 

- State the maximum depth of the parallax map.  This is a fairly sensitive

  value, and I recommend the default or lower.  Default 0.05.

Posted

This is missing <deviance> <samples> at the end here, if it is sunExt

q3map_sun/q3map_sunext <R> <G> <B> <Pitch> <Yaw> <Roll>

These control penumbra of the sun lighting. 

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