摘要:
private var first = Vector2.zero; private var second = Vector2.zero; function Update () { } function OnGUI () { if(Event.current.type == EventType.MouseDown) { //记录鼠标按下的位置 first = Event.current.mousePosition ; } if(Event.current.type == EventType.MouseDrag) { ... 阅读全文
posted @ 2012-09-20 18:48
softimagewht
阅读(2524)
评论(0)
推荐(0)
摘要:
private string timerValue = "0:00:00"; // Use this for initialization void Start() { InvokeRepeating("TimerUpdate", 1.0f, 0.13f); timerSkin = (GUISkin)Resources.Load("TimerGUISkin"); } private void TimerUpdate() { float minutes = Mathf.FloorToInt(Time... 阅读全文
posted @ 2012-09-20 18:31
softimagewht
阅读(237)
评论(0)
推荐(0)
摘要:
Shader "mask shader"{ Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _Mask ("Culling Mask", 2D) = "white" {} _Cutoff ("Alpha cutoff", Range (0,1)) = 0.1 } SubShader { Tags {"Queue"="Transparent"} Lighting Off ZWri 阅读全文
posted @ 2012-09-20 16:15
softimagewht
阅读(915)
评论(0)
推荐(0)
摘要:
using UnityEngine;using System.Collections; public class example : MonoBehaviour { void Update() { RaycastHit[] hits; hits = Physics.RaycastAll(transform.position, transform.forward, 100.0F); int i = 0; while (i < hits.Length) { RaycastHit hit = hits[i]; ... 阅读全文
posted @ 2012-09-20 09:00
softimagewht
阅读(333)
评论(0)
推荐(0)
摘要:
轮廓描边是游戏中的细节 然则一个有特点的结果还是会让人面前一亮Glow + Outline 的结果就像求生之路2和暗黑3的轮廓描鸿沟一样 对轮廓描边后再进行模糊处理惩罚如图: 求生之路2暗黑3 一种思路为:1、在RTT中绘制单一像素2、对1绘制后的RTT进行blur处理惩罚3、对2处理惩罚后的RTT与原始场景进行叠加4、绘制原始模型另一种思路:1、绘制原始模型到RTT2、对1绘制的RTT华夏始模型进行Sobel描边3、对2描边后的RenderTexture进行blur处理惩罚4、叠加1和3的RenderTexture5、4与场景进行叠加在unity3d中的实现1、场景图像衬着之前void O. 阅读全文
posted @ 2012-09-20 08:56
softimagewht
阅读(546)
评论(0)
推荐(0)

浙公网安备 33010602011771号