command
Last updated
Last updated
This type is used to change render command parameters.
Be cautious when changing stuff in an instance of this type. Passing invalid data to texture
or frag_shader
, or not restoring some changes after you're done drawing can lead to undefined behavior, and more likely, a crash. If you are not sure how to operate this type, take a look into examples.
Type:
Texture pointer. You can get one from an instance of texture
type by accessing obj
field. Passing invalid data to this field WILL result in a crash. For a safer way, please use .
Type: Type:
Fragment shader (aka Pixel Shader in DirectX terms) pointer. You can get one from an instance of shader
type by accessing obj
field. Passing invalid data to this field WILL result in a crash. For a safer way, please use .
Type:
Clip rectangle used for scissor testing. If this is set to nil
, will not clip anything.
It is advised to instead use layer's override_clip_rect
method. While you can pass custom rect to this field, you will lose information about previous clip rects set before. Using that method will make sure to intersect the previous rect with the one you pass and produce a probably more expected result.
UV rect used for texture mapping. If this field is set to nil
, will use 0, 0, 1, 1
rectangle to map the texture. You can learn more about texture mapping in the tutorial section.
Type: float
Global opacity override. Defaults to 1
, but if you set anything else - will modulate opacity of every next shape you will render.
Type: float
Shape rotation. Not all shapes support this field. The value is set in degrees, not radians.
Type: bool
If set to true
, will apply tesselation to shapes.
Type: bool
If set to true
, will ignore global DPI scale. This is set to true
by default, but you are free to change it to false
if you are trying to render some custom UI elements.
Type: bool
Only useful when using shaders. If set to true
, will not update back buffer texture. This can be used if you need the very same texture data, as when applying several shaders to the back buffer.
Type: bool
If set to true
, will capture back buffer (as long as chained_call
is set to false
). The name of this field is quite misleading due to the fact that in the CS:GO version of Fatality, it was used to configure if the rendering system should also downsample the captured backbuffer into another texture. In DirectX11, this operation is much faster, so it is done regardless.
Type: bool
An alias to only_downsampled
.
Type: bool
If set to true
, will use a separate texture sampler that supports tiling. By default, all textures are stretched, but if you enable this option - their tiling and stretch will be fully configurable by the uv_rect
field.
Rendering mode. You can read more about it in the type's documentation.
Sets a texture in a safe manner.
Arguments
Name
Type
Description
tex
Texture object.
Returns
Nothing.
Example
Sets a fragment shader in a safe manner.
Arguments
Name
Type
Description
sh
[shader
]
Shader object.
Returns
Nothing.
Example
Type:
Type: