Repository navigation
Draw_Texture
haw2fregel edited this page Mar 19, 2025
·
6 revisions
Draw_Texture任意のテクスチャを描画します |
![]() |
|---|
Draw描画カラーを制御します |
![]() |
|
|---|---|---|
| 操作例 | ![]() |
|
Draw Color描画カラーを制御します |
Draw *= DrawColor | ![]() |
Texture描画Textureを変更します |
![]() |
|
|---|---|---|
| 操作例 | ![]() |
|
TextureTextureを変更します |
![]() |
|
Filter Mode描画フィルターを切り替えます NonFilter:フィルターをかけずにそのまま描画します Smooth Filter:ぼかしフィルターを掛けます |
![]() |
UVDeformUVを変形します |
![]() |
|
|---|---|---|
| 操作例 | ![]() |
|
Pivot変形の原点を変更します これ単体では変化はありません |
![]() |
|
TileUVのサイズを変更します |
return (uv - _UVPivot) * _UVScale + _UVPivot; | ![]() |
RotateUVを回転します |
float rotate = value * (3.1415926f / 180.0f); float2 result = uv - center;<brfloat s = sin(rotate);<brfloat c = cos(rotate); float2x2 rMatrix = float2x2(c, -s, s, c);<brrMatrix *= 0.5; rMatrix += 0.5; rMatrix = rMatrix * 2 - 1; result.xy = mul(result.xy, rMatrix); result += center; return result; |
![]() |
BendUVを傾けます Pivotから遠いほどズレます |
return uv + float2(abs(uv.y - _UVPivot.x) * _UVBend.x, abs(uv.x - _UVPivot.y) * _UVBend.y); | ![]() |
Polar極座標に変換します |
float2 delta = uv - float2(0.5, 0.5) delta.x = delta.x == 0 ? EPSILON : delta.x delta.y = delta.y == 0 ? EPSILON : delta.y float radius = lengthN(delta, 2) * 2 float angle = atan2(delta.x, delta.y) * (1.0 / 6.28) + 0.5 return _UVPolar == 0 ? uv : float2(radius, angle); |
![]() |
RepeatUV0~1で繰り返すようになります |
frac(uv) | ![]() |
Opacity前Layerとの合成方法を制御します |
![]() |
|
|---|---|---|
| 操作例 | ![]() |
|
Blend Mode合成モードを変更します ※1:乗算の逆バージョンのイメージ 背景が暗いほど描画色が明るく反映されます ※2:ScreenとMultipleの合わせ技 背景が暗い場所は乗算、明るい場所はスクリーン コントラストが強くなります 白黒背景にOverlayを重ねると明暗を維持して色味を反映できます ※3:背景と描画色の差分出力します |
Overrite:BG * (1-opacity) + Draw * opacityAdd: BG + Draw * OpacitySubrtuct: BG - Draw * OpacityMultiple: BG * (1-opacity) + BG * Draw * opacityDivid: BG * (1-opacity) + BG / Draw * opacityMax: BG * (1-opacity) + max(BG ,Draw)* opacityMin: BG * (1-opacity) + min(BG ,Draw)* opacityScreen:※1 BG * (1-opacity) + (1-(1-BG)*(1-Draw))* opacityOverlay:※2 screen = (1-(1-BG)*(1-Draw))multiple = 2.0 * BG * Drawoverlay = multiple * (1-step(BG,0.5)) + screen * step(BG,0.5)BG * (1-opacity) + overlay * opacityDifference:※3 BG * (1-opacity) + abs(Draw - BG) + opacity
|
![]() |
Draw Channel描画時に利用するチャンネルを切り替えます R:赤 G:緑 B:青 A:アルファ Luminance:明るさ 1:描画カラーを無視して1で描画します 0:描画カラーを無視して0で描画します None:描画カラーを無視して背景色のままになります 特定チャンネルのみを描画したり、チャンネルを入れ替えたい場合に利用します |
![]() |
|
Opacity合成割合を調整します BlendModeに合わせた計算に利用されます |
opacity *= drawColor.w | ![]() |
Power累乗計算します Draw^power
|
![]() |
|
Multiply Alphaopacityに対して描画カラーのアルファを乗算します |
![]() |
|
OneMinus描画カラーを反転します |
1 - Draw | ![]() |
Contrast描画カラーのコントラストを調整します 0.5以下はより暗く、0.5以上はより明るく |
saturate((Draw- 0.5) * _Contrast + 0.5) | ![]() |























