查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Faye Euler's blog

技術交流歡迎留言

 
 
 
 
 
 

一堆遮罩shader

2013-12-31 16:21:46 阅读1336 评论1 312013/12 Dec31

转载请注明出处http://oulehui.blog.163.com/blog/static/796146982013113142146354/

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

ZWrite Off

Blend SrcAlpha OneMinusSrcAlpha

AlphaTest GEqual [_Cutoff]

Pass

{

SetTexture [_Mask] {combine texture}

SetTexture [_MainTex] {combine texture, previous}

}

}

作者  | 2013-12-31 16:21:46 | 阅读(1336) |评论(1) | 阅读全文>>

a no lighting unity shader

2013-12-31 14:51:34 阅读734 评论0 312013/12 Dec31

版权所有,转载请注明出处http://oulehui.blog.163.com/blog/static/796146982013113125134746/

Shader "no lighting" {

Properties {

 _MainTex ("Base (RGB)", 2D) = "white" {}

}

SubShader {

 Tags { "RenderType"="Opaque" }

 LOD 100

// Non-lightmapped

 Pass {

  Tags { "LightMode" = "Vertex" }

  Lighting Off

  SetTexture [_MainTex] { combine texture }

 }

Pass {

  Tags { "LightMode" = "VertexLM" }

Lighting Off

  BindChannels {

作者  | 2013-12-31 14:51:34 | 阅读(734) |评论(0) | 阅读全文>>

Unity3d Unity读取本地图片(PC版)

2013-12-31 11:37:45 阅读18207 评论0 312013/12 Dec31

版权所有,转载请注明出处:http://oulehui.blog.163.com/blog/static/79614698201311311137880/

using UnityEngine;

using System.Collections;

using System.Text;

using System.Runtime.InteropServices;

using System;

public class Test : MonoBehaviour {

    public GameObject plane;

public GUIStyle open;

void OnGUI()

    {

        if(GUI.Button(new Rect(0,0,67,51),"",open))

        {

            OpenFileName ofn = new OpenFileName();

ofn.structSize = Marshal.SizeOf(ofn);

ofn.filter = "JPG Files (*.jpg)\0*.jpg\0All Files (*.*)\0*.*\0";

ofn.file = new string(new char[256]);

ofn.maxFile = ofn.file.Length;

ofn.fileTitle = new string(new char[64]);

ofn.maxFileTitle = ofn.fileTitle.Length;

作者  | 2013-12-31 11:37:45 | 阅读(18207) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 

广东省 佛山市 狮子座

 发消息  写留言

 
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018

注册 登录  
 加关注