NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches

Classes

struct  nnl::render::RenderConfig
 Represents settings for rendering. More...

Functions

bool nnl::render::IsOfType (BufferView buffer)
 Tests if the provided file is a render config.
RenderConfig nnl::render::Import (BufferView buffer)
 Parses a binary file and converts it to a RenderConfig struct.
Buffer nnl::render::Export (const RenderConfig &render_config)
 Converts a render config to a binary file representation.

Detailed Description


Class Documentation

◆ nnl::render::RenderConfig

struct nnl::render::RenderConfig

Represents settings for rendering.

Note
This type of config is used only in NSUNI!
See also
nnl::fog::Fog

Public Attributes

u8 bloom_translucency = 0x7F
f32 mipmap_bias = 0.1f
f32 mipmap_slope = 0.002f
f32 fog_near = 500.0f
f32 fog_draw_distance_far = 1200.0f
u32 fog_color = 0xFF'00'00'00
u8 distance_transition_translucency = 0

Member Data Documentation

◆ bloom_translucency

u8 nnl::render::RenderConfig::bloom_translucency = 0x7F

Controls the visibility of the bloom effect. 0 means the effect is the strongest.

◆ distance_transition_translucency

u8 nnl::render::RenderConfig::distance_transition_translucency = 0

Controls whether objects located at the edge of the rendering distance disappear immediately or gradually become transparent. A value of 0 (fully opaque) or 255 means the effect won't be noticeable. Set it to 0 for the maximum rendering distance.

◆ fog_color

u32 nnl::render::RenderConfig::fog_color = 0xFF'00'00'00

Color of the fog in the ABGR format (alpha is ignored)

◆ fog_draw_distance_far

f32 nnl::render::RenderConfig::fog_draw_distance_far = 1200.0f

Sets the rendering distance and the distance where the fog fully covers objects. A value of 100.0 is added to it by the game engine.

◆ fog_near

f32 nnl::render::RenderConfig::fog_near = 500.0f

Sets the distance where the fog starts to cover spawned entities (characters, crates). It has no effect on map objects. The value may be negative.

◆ mipmap_bias

f32 nnl::render::RenderConfig::mipmap_bias = 0.1f

An offset value that is added to the LoD calculation of a texture (aka OFFL)

◆ mipmap_slope

f32 nnl::render::RenderConfig::mipmap_slope = 0.002f

Another value that is used to calculate LoD (aka TSLOPE, see the official GE docs for more details)

Function Documentation

◆ Export()

Buffer nnl::render::Export ( const RenderConfig & render_config)
nodiscard

Converts a render config to a binary file representation.

This function takes a RenderConfig object and converts it into a Buffer, which represents the binary format of the render config.

Parameters
render_configThe RenderConfig object to be converted.
Returns
A Buffer containing the binary representation of the config.

◆ Import()

RenderConfig nnl::render::Import ( BufferView buffer)

Parses a binary file and converts it to a RenderConfig struct.

This function takes a binary representation of a render config, parses its contents, and converts them into a RenderConfig struct for easier access and manipulation.

Parameters
bufferThe binary data to be processed.
Returns
A RenderConfig object representing the converted data.
See also
nnl::render::IsOfType
nnl::render::Export

◆ IsOfType()

bool nnl::render::IsOfType ( BufferView buffer)

Tests if the provided file is a render config.

This function takes data representing a file and checks whether it corresponds to the in-game render config format.

Parameters
bufferThe data to be tested.
Returns
Returns true if the file is identified as a render config;
See also
nnl::render::Import