ASE例項1 熔岩效果

2021-10-01 20:38:56 字數 1429 閱讀 7596

乙個入門級的uv移動+材質疊加+sin時間,形成的熔岩明暗交替流動效果

要點:1.texturecoordinates,紋理座標,**為uv=uv * 縮放+ 偏移,控制uv的縮放和偏移

2.panner節點,uv控制器,**為uv=uv+speed.xy*time,常用於uv隨著時間發生變化

生成**:

shader "asesampleshaders/animatedfire"

_normals("normals", 2d) = "bump" {}

_mask("mask", 2d) = "white" {}

_specular("specular", 2d) = "white" {}

_tileablefire("tileablefire", 2d) = "white" {}

_fireintensity("fireintensity", range( 0 , 2)) = 0

_smoothness("smoothness", float) = 1

_tilespeed("tilespeed", vector) = (0,0,0,0)

[hideininspector] _texcoord( "", 2d ) = "white" {}

[hideininspector] __dirty( "", int ) = 1

} subshader

cull back

ztest lequal

cgprogram

#include "unityshadervariables.cginc"

#pragma target 3.0

#pragma su***ce surf standardspecular keepalpha

struct input

; uniform sampler2d _normals;

uniform sampler2d _albedo;

uniform sampler2d _mask;

uniform sampler2d _tileablefire;

uniform float2 _tilespeed;

uniform float _fireintensity;

uniform sampler2d _specular;

uniform float _smoothness;

void surf( input i , inout su***ceoutputstandardspecular o )

endcg

} fallback "diffuse"

customeditor "asematerialinspector"

}

WPF小例項 1 倒影效果

先看效果圖 效果沒有多麼的絢麗多彩,主要是因為本人能力有限,也是wpf的初學者,在wpf的開發過程中,容易控制不住自己的 藝術細胞 總會有某種衝動去做一些效果,所以在今後的時間裡我會一邊學,一邊記錄這些常用的,自己做過的一些wpf的效果的例項,一.是為了記錄下來,以後方便查閱 二是為了和大傢伙分享一...

jQuery 效果 動畫 方法例項

jquery animate 方法允許您建立自定義的動畫。jquery 動畫 animate 方法 jquery animate 方法用於建立自定義動畫。語法 selector animate speed,callback 必需的 params 引數定義形成動畫的 css 屬性。可選的 speed ...

jQuery滑動效果例項

parents expr 取得乙個包含著所有匹配元素的祖先元素的元素集合 不包含根元素 可以通過乙個可選的表示式進行篩選。獲取的是集合。html hello hello again jquery span parents p 找到每個span的所有是p元素的祖先元素。find expr 搜尋所有與指...