1
0
mirror of https://github.com/AcChosen/VR-Stage-Lighting.git synced 2025-02-25 21:58:09 +01:00

Updated VRSL DMX: Creating Custom DMX Shaders (markdown)

AcChosen 2023-02-16 16:04:36 -05:00
parent 37f8e44631
commit 02eb14613e

@ -16,7 +16,13 @@ This file contains a few instanced defined properties, standard defined properti
These two are the two properties most important:
- `_DMXChannel ("Starting DMX Channel", Int) = 1`
- The `_DMXChannel` instanced property is where you'll set the starting DMX Channel for your DMX shader. DMX Channels start reading from 1, so 1 is the default.
- The `_DMXChannel` instanced property is where you'll set the starting DMX Channel for your DMX shader. DMX Channels start reading from 1, so 1 is the default. This is more of a "raw" channel number and should be used only for world shaders when its controlled by the `VRStageLighting_DMX_Static` script.
- `_Channel ("Starting DMX Channel", Int) = 1`
- An alternative to "_DMXCHannel" for avatar shaders. Use this to manually set the proper dmx512 channel.
- `_Universe("Starting DMX Universe", Int) = 1`
- An alternative to "_DMXCHannel" for avatar shaders. Use this in conjunction with `_Channel` to manually set the universe for the dmx512 channel.
- `[NoScaleOffset] _DMXGridRenderTexture("DMX Grid Render Texture (To Control Lights)", 2D) = "white" {}`
- The `_DMXGridRenderTexture` is where the DMX Grid render texture will actually go. You can find the render textures in: `Packages/com.acchosen.vr-stage-lighting/Runtime/Textures/RTs`. There you can find the horizontal, vertical, and legacy versions of the textures. I recommend using the `DMXRTViewer-Interpolated-Color+Intensity` prefixed render textures as those are the slighting smoothed versions of the RAW render texture counterparts.
@ -67,7 +73,10 @@ The general use case, however, will be to use the `ReadDMX()` function with `Get
- Returns a 0-1 value from a specified DMX channel from the provided texture. Use this with `GetDMXChannel()` as input. You can increment `GetDMXChannel()` to get nearby channels to sample from for different properties. It is recommended to use the standard `_DMXGridRenderTexture` as the texture input.
- `GetDMXChannel()`
- Returns the instanced DMX channel property of your shader as a uint.
- Returns the instanced DMX channel property of your shader as a uint. Use this for world shaders.
- `ConvertToRawDMXChannel(int chan, int universe)`
- Returns a conversion of the standard dmx channel and universe properties that you use for avatar shaders. Input the _Channel and _Universe properties to convert it to its "raw" dmx channel format. This is the avatar shader equivalent for `GetDMXChannel()`
## The Standard Functions