v1.0
shader
ライトのリストまたはオブジェクトのリストをシェーダに追加します。
AddObjectsToShader( [InputObjs], [Target] ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| InputObjs | 文字列 | シェーダに追加するオブジェクトのリスト。
デフォルト値: 現在選択されている値 何も選択されていない場合はユーザがオブジェクトを指定します。 |
| Target | 文字列 | シェーダ プロパティのリスト
(lights、difflights、または objs)。
デフォルト値: 現在選択されている値 |
'
' This example creates a spotlight with a realistic light emission
' by adding a spotlight to the scene, applying a volume shader to the
' default pass, and then connecting it to the spotlight.
'
NewScene , false
' Get a spot light
GetPrimLight "Spot", "Center_Stage", , , oSpotObj
' Apply a light shader and get an object pointer to it (the returned
' value is an XSICollection containing the shader as its only member)
Set oRetValue = SIApplyShader( "Fast_light_effects.Preset", oSpotObj )
Set oLightShader = oRetValue(0)
' Add a volume shader on the default pass and save its fullname
Set oDefPass = GetValue( "Passes.Default_Pass" )
sVolShader = SIApplyShaderToCnxPoint( "Fast_volume_effects.Preset", _
oDefPass & ".VolumeShaderStack", , false )
sLightCnxPnt = sVolShader & ".Lights"
' Render a single frame of the default pass just to see the spotlight
' before connecting it to the volume shader
RenderPasses oDefPass, 1, 1
' Now add the Spot to the Volume shader light list
AddObjectsToShader oSpotObj, sLightCnxPnt
' Render a single frame of the default pass just to see the spotlight
' after connecting it to the volume shader
RenderPasses oDefPass, 1, 1
|