Skip to content

Library: Renderer

Aviril edited this page Nov 29, 2024 · 2 revisions

» What's the Objective?

Assetify offers virtual rendering pipeline alongside default to enhance graphics (Optional). Some shared rendering functions are bundled within the same module as well to make migrating easier.

» How to Import?

Add the below code once in either of the shared .lua script of the resource you want to use within:

--Declare it globally only once
loadstring(exports.assetify_library:import("renderer"))()

» APIs

━ assetify.renderer.isVirtualRendering() (Client)

@Objective: Retrieves virtual rendering's state.
local bool: result = assetify.renderer.isVirtualRendering()

━ assetify.renderer.setVirtualRendering() (Client)

@Objective: Sets virtual rendering's state.
local bool: result = assetify.renderer.setVirtualRendering(
  bool: state,
  table: rtModes
)

━ assetify.renderer.getVirtualSource() (Client)

@Objective: Fetches virtual source.
local element: cSource = assetify.renderer.getVirtualSource()

━ assetify.renderer.getVirtualRTs() (Client)

@Objective: Fetches virtual RTs.
local table: cVRTs = assetify.renderer.getVirtualRTs()

━ assetify.renderer.isTimeSynced() (Client)

@Objective: Retrieves time-sync's state.
local bool: result = assetify.renderer.isTimeSynced()

━ assetify.renderer.setTimeSync() (Client)

@Objective: Sets time-sync's state.
local bool: result = assetify.renderer.setTimeSync(
  bool: state
)

━ assetify.renderer.setServerTick() (Client)

@Objective: Syncs server's tick.
local bool: result = assetify.renderer.setServerTick(
  float: tick
)

━ assetify.renderer.setMinuteDuration() (Client)

@Objective: Syncs minute duration (Milliseconds in a minute).
local bool: result = assetify.renderer.setMinuteDuration(
  float: duration
)

━ assetify.renderer.getAntiAliasing() (Client)

@Objective: Retrieves anti-aliasing intensity.
local float: result = assetify.renderer.getAntiAliasing()

━ assetify.renderer.setAntiAliasing() (Client)

@Objective: Sets anti-aliasing intensity.
local bool: result = assetify.renderer.setAntiAliasing(
  float: intensity
)

━ assetify.renderer.isEmissiveMode() (Client)

@Objective: Retrieves emissive mode's state.
local bool: result = assetify.renderer.isEmissiveMode()

━ assetify.renderer.setEmissiveMode() (Client)

@Objective: Sets emissive mode's state.
local bool: result = assetify.renderer.setEmissiveMode(
  bool: state
)

━ assetify.renderer.isDynamicSky() (Client)

@Objective: Retrieves dynamic sky's state.
local bool: result = assetify.renderer.isDynamicSky()

━ assetify.renderer.setDynamicSky() (Client)

@Objective: Sets dynamic sky's state.
local bool: result = assetify.renderer.setDynamicSky(
  bool: state
)

━ assetify.renderer.isDynamicPrelights() (Client)

@Objective: Retrieves dynamic prelights' state.
local bool: result = assetify.renderer.isDynamicPrelights()

━ assetify.renderer.setDynamicPrelights() (Client)

@Objective: Sets dynamic prelights' state.
local bool: result = assetify.renderer.setDynamicPrelights(
  bool: state
)

━ assetify.renderer.getDynamicSunColor() (Client)

@Objective: Retrieves dynamic sun's color.
local float: r, float: g, float: b = assetify.renderer.getDynamicSunColor()

━ assetify.renderer.setDynamicSunColor() (Client)

@Objective: Sets dynamic sun's color.
local bool: result = assetify.renderer.setDynamicSunColor(
  float: r,
  float: g,
  float: b
)

━ assetify.renderer.isDynamicStars() (Client)

@Objective: Retrieves dynamic stars' state.
local bool: result = assetify.renderer.isDynamicStars()

━ assetify.renderer.setDynamicStars() (Client)

@Objective: Sets dynamic stars' state.
local bool: result = assetify.renderer.setDynamicStars(
  bool: state
)

━ assetify.renderer.getDynamicCloudDensity() (Client)

@Objective: Retrieves dynamic cloud's density.
local float: result = assetify.renderer.getDynamicCloudDensity()

━ assetify.renderer.setDynamicCloudDensity() (Client)

@Objective: Sets dynamic cloud's density.
local bool: result = assetify.renderer.setDynamicCloudDensity(
  float: density
)

━ assetify.renderer.getDynamicCloudScale() (Client)

@Objective: Retrieves dynamic cloud's scale.
local float: result = assetify.renderer.getDynamicCloudScale()

━ assetify.renderer.setDynamicCloudScale() (Client)

@Objective: Sets dynamic cloud's scale.
local bool: result = assetify.renderer.setDynamicCloudScale(
  float: scale
)

━ assetify.renderer.getDynamicCloudColor() (Client)

@Objective: Retrieves dynamic cloud's color.
local float: r, float: g, float: b = assetify.renderer.getDynamicCloudColor()

━ assetify.renderer.setDynamicCloudColor() (Client)

@Objective: Sets dynamic cloud's color.
local bool: result = assetify.renderer.setDynamicCloudColor(
  float: r,
  float: g,
  float: b
)

━ assetify.renderer.getTimeCycle() (Client)

@Objective: Retrieves dynamic sky's timecyclc.
local table: timecyc = assetify.renderer.getTimeCycle()

━ assetify.renderer.setTimeCycle() (Client)

@Objective: Sets dynamic sky's timecycle.
ℹ️ Refer 🔗 to know more about timecyc format!
local bool: result = assetify.renderer.setTimeCycle(
  table: timecyc
)
Clone this wiki locally