[ZScript] RenderRequired/RenderHidden
Posted: Sat Jul 29, 2017 4:12 pm
As of the latest devbuild, actors can now specify "RenderRequired/RenderHidden" properties that disable rendering based on certain criteria.
Both of these options are bitmask fields and support the following:
RenderHidden hides the actor if any of your specified criteria are true, RenderRequired hides the actor if any of those criteria are false.
These go into your actor properties just like any other:
ZScript:
Attached is an example that should allow you to play around with this feature. Simply load it into E1M1.
Note that "r_showcaps" will show a list of these flags and whether the current renderer supports them.
Both of these options are bitmask fields and support the following:
- RFF_FLATSPRITES - flat sprite support
- RFF_MODELS - 3d models support
- RFF_SLOPE3DFLOORS - sloped 3d floor support
- RFF_TILTPITCH - full free-look is currently supported
- RFF_ROLLSPRITES - roll sprites are supported
- RFF_UNCLIPPEDTEX - midtex and sprite can render "into" flats and walls
- RFF_MATSHADER - material shaders
- RFF_POSTSHADER - post-process shaders (renderbuffers)
- RFF_BRIGHTMAP - brightmaps
- RFF_COLORMAP - custom colormaps (incl. ability to fullbright certain ranges, ala Strife)
- RFF_POLYGONAL - uses polygons instead of wallscans/visplanes (i.e. softpoly and hardware opengl)
- RFF_TRUECOLOR - renderer is currently truecolor
- RFF_VOXELS - renderer is capable of voxels
RenderHidden hides the actor if any of your specified criteria are true, RenderRequired hides the actor if any of those criteria are false.
These go into your actor properties just like any other:
ZScript:
Code: Select all
class explosivebarreltesting : explosivebarrel replaces explosivebarrel
{
Default
{
RenderRequired RFF_POLYGONAL | RFF_TRUECOLOR;
RenderHidden RFF_COLORMAP;
}
}
Note that "r_showcaps" will show a list of these flags and whether the current renderer supports them.