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)
parent
add8958d67
commit
ac86773b04
@ -96,9 +96,9 @@ Shader "Unlit/VRSL-TutorialV2"
|
||||
//Use this for World Shaders
|
||||
int dmx = GetDMXChannel();
|
||||
|
||||
float intensity = ReadDMX(dmx, _Udon_DMXGridRenderTexture); // 0-1
|
||||
float4 color = GetDMXColor(dmx+1);
|
||||
float strobe = GetStrobeOutput(dmx + 4);
|
||||
float intensity = ReadDMX(dmx, _Udon_DMXGridRenderTexture); // 0-1 output
|
||||
float4 color = GetDMXColor(dmx+1); //this is the same as 3 ReadDMX() calls mapped to a float3 with 1 in the alpha channel
|
||||
float strobe = GetStrobeOutput(dmx + 4); // a special function for getting strobe output, which is a square wave from 0-1
|
||||
o.finalColor = (intensity * color) * strobe;
|
||||
|
||||
o.finalColor = isDMX() ? o.finalColor : getBaseEmission();
|
||||
|
Loading…
x
Reference in New Issue
Block a user