블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2794)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (11)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

Visual Studio 10 또는 12에서 Shader Syntax Highlighting하기


1. http://nshader.codeplex.com/ 에서 가서 nShader를 다운을 받고 플러그인 설치.


2. NShader.pkgdef 파일 메모장 또는 기타 에디터로 열기. (2012의 경우)

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\(NShader 폴더 : 컴퓨터마다 폴더명이 다르다. )


3. Unity3d .shader 확장자를 위해 "CodeBase"="$PackageFolder$\NShader.dll" 코드 아래에 다음을 추가한다.

[$RootKey$\Languages\File Extensions\.shader]

@="{4c554917-0eb7-3742-9f6b-f2f529fc6729}"

[$RootKey$\Languages\File Extensions\.cginc]

@="{4c554917-0eb7-3742-9f6b-f2f529fc6729}"


4. 레지스트리에서 아래 경로 삭제

- HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors\Cache 

- HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config 



출처 : http://workspage.net/37

반응형

'Unity3D > Shader' 카테고리의 다른 글

Unity3d Shader Syntax Highlighting(Visual Studio 2010/2012/2013)  (0) 2015.03.24
[NGUI] Unlit - Transparent Colored Additive  (4) 2015.01.27
Unity Shader 공부  (0) 2014.07.16
Shader Code  (0) 2014.07.16
유니티 셰이더의 기초  (0) 2014.06.28
Posted by blueasa
, |


링크 : http://wlhermit.blog.me/220061141482


원본 링크 : http://darkgenesis.zenithmoon.com/so-you-want-to-be-a-unity3d-game-developer/



So you want to be a Unity3D game developer?

UnityDeveloper

Unity3D has been making great strides of late, it’s has been one of the big go-to middleware engines for budding iOS and Android game developers and even expanded its reach to Web, Windows desktop and other platforms.

It’s recent Microsoft partnerships have also been making big waves and have spurred on its adoption, introducing both the Windows Phone 8 and Windows 8 platforms and more recently with the announcement of Xbox One support, best of all it’s completely free for all Microsoft platforms.

Unity3D comes in three flavours:

 Unity3D Trial

When you first download Unity3D and setup a new account you get access to all of Unities tools and accessories that are included in the Pro version for 30 days, after that it will revert to the Free version or you can pay for Pro.

 Unity3D Free

As it says on the box, this is the default Free tier for Unity, you get access to the editor and all the basic features, however some advanced performance, profiling and graphics features are disabled.  You can still make one heck of a game if you do it right and it’s perfect while you are learning Unity.  But once your game gets beyond a certain size you may find the lack of the pro features limiting.

 Unity3D Pro

Basically every tool and feature of Unity at your disposal including LOD support, texture batching, asset streaming, custom splash screens, 3D textures and HDR, the list goes on – see Unity Pro detail page for more details and a comparison of the Pro vs Free features.


So how to get started?

As with my Monster links post, I’ve compiled an extensive list of resources at your disposable on your Unity3D journey, split up in to sections to allow you to target what you need.

Beginner tutorials

Intermediate tutorials

2D specific tutorials

Project based training – learn by doing

Video based tutorials

Unity3D component tutorials

Unity3D master sites – Unity training is just their thing

Unity3D paid for training

Scripting links and help

Design or 3D modelling help

Shader help and tutorials

Performance and architecture

Platform specific

Animation and Mecanim

Generic Tips and Tricks

Multiplayer tutorials

Music and Audio

Unity addons and engines

Cloud and backend systems

Help and forums

Sample Projects

Resources

Other things to check


On with the show

If you know of any other stella resources out there that will help out a new comer to Unity3D or a set of advanced tutorials and resources then be sure to comment below and I’ll add them in.

Like the other “Monster Set of Resources” post, I try to keep these up to date with new additions as I find them.

Party on.


반응형
Posted by blueasa
, |

Unity Shader 공부

Unity3D/Shader / 2014. 7. 16. 13:54

Link : Unity Shader 공부

반응형

'Unity3D > Shader' 카테고리의 다른 글

[NGUI] Unlit - Transparent Colored Additive  (4) 2015.01.27
Unity3d Shader Syntax Highlighting(Visual Studio 2010 또는 2012)  (0) 2014.07.21
Shader Code  (0) 2014.07.16
유니티 셰이더의 기초  (0) 2014.06.28
Unity Shader Reference  (0) 2014.06.24
Posted by blueasa
, |

Shader Code

Unity3D/Shader / 2014. 7. 16. 10:21

출처 : http://wiki.unity3d.com/index.php/Shader_Code#Built-In


Shader Code

DISCLAIMER: This page is written by Unity users and is built around their knowledge. Some users may be more knowledgeable than others, so the information contained within may not be entirely complete or accurate.

Contents

 [hide

Structures

Unity's shaders use structures to pass information down the rendering pipeline.

Application to Vertex Shader Structure (appdata)

The first structure passes raw information about the geometry being rendered to the vertex shader. To create your own appdata structure, they must conform to the formatting and limitations outlined below. See the built-in appdata structures below for an example.

Format

 Structure:
 struct [Name]
 {
     [One or more Fields]
 };
 
 Field:
 [Type] [Name] : [Tag];

Acceptable Fields

The following fields can be written in the structure in any order.

Type(s)NameTagNotes
float4vertexPOSITIONThe position of the vertex in local space (model space)
float3normalNORMALThe normal of the vertex
float4texcoordTEXCOORD0The UV coordinate for that vertex. Mesh being rendered must have at least one texture coordinate. The third and fourth floats in the vector represent a 3rd UV dimension and a scale factor, and are rarely if ever used.
float4texcoord1TEXCOORD1A second set of UV coordinates for the vertex. (Only two are supported.) Always present, but often not used.
float4tangentTANGENTAll meshes have either calculated or imported tangents.
float4colorCOLORThe color value of this vertex specifically. Mesh must have colors defined, otherwise they default to <TODO>.

<TODO: Complete this list>

Built-In

Base structure, contains the least amount of data that most shaders will use.

 struct appdata_base
 {
     float4 vertex   : POSITION;  // The vertex position in model space.
     float3 normal   : NORMAL;    // The vertex normal in model space.
     float4 texcoord : TEXCOORD0; // The first UV coordinate.
 };

Tangents included - tangents are used to rotate the normals of normal maps when the normal maps are also rotated. Use this structure if you wish to intervene in their calculation process and manipulate them. If you do not want to manipulate tangents you may use the base structure instead since they will be calculated anyway. <TODO: Determine if the tangents need to be transformed if they are manipulated here, or if they can be left in model space.>

 struct appdata_tan
 {
     float4 vertex   : POSITION;  // The vertex position in model space.
     float3 normal   : NORMAL;    // The vertex normal in model space.
     float4 texcoord : TEXCOORD0; // The first UV coordinate.
     float4 tangent  : TANGENT;   // The tangent vector in model space (used for normal mapping).
 };

All the possible fields you can derive from a mesh about to be rendered are in this structure.

 struct appdata_full
 {
     float4 vertex    : POSITION;  // The vertex position in model space.
     float3 normal    : NORMAL;    // The vertex normal in model space.
     float4 texcoord  : TEXCOORD0; // The first UV coordinate.
     float4 texcoord1 : TEXCOORD1; // The second UV coordinate.
     float4 tangent   : TANGENT;   // The tangent vector in Model Space (used for normal mapping).
     float4 color     : COLOR;     // Per-vertex color
 };

Vertex Shader to Fragment Shader Structure (v2f)

The second structure contains information generated by the vertex shader which is passed to the fragment shader. The vertex shader calculates and returns these values on a per-vertex basis. An interpolator then then calculates these same values on a per-pixel basis when the connected polygons are rasterized. The interpolated values are then used by the fragment shader. To create your own v2f structure, they must conform to the formatting and limitations outlined below. See the built-in v2f structures below for an example.

Format

 Structure:
 struct [Name]
 {
     [One or more Fields]
 };
 
 Field:
 [Type] [Name] : [Tag];
 or
 [Type] [Name];

Acceptable Fields

The following fields can be written in the structure in any order.

Type(s)NameTagDescriptionNotes
float4posSV_POSITIONThe position of the vertex after being transformed into projection space.Structure must contain exactly one field tagged SV_POSITION.
float3NORMALThe normal of the vertex after being transformed into view space.Structure must contain exactly one field tagged with NORMAL if the subsequent surface or fragment shader uses normals. <TODO: Verify>
float4uvTEXCOORD0First texture coordinate, or UV.
float4TEXCOORD1Second texture coordinate, or UV.Currently only two UV coordinates are supported per vertex, but you may bypass this by defining custom fields which act as additional UV coordinates.
float4TANGENTTangents are used to correct normal maps when they are viewed from different angles. Normal maps have incorrect values when they are rotated without processing from tangents.
float4, fixed4diffCOLOR0Vertex color, interpolated across the triangle. This value could correspond to anything depending on how the fragment shader interprets it.
float4, fixed4specCOLOR1Vertex color, interpolated across the triangle. This value could correspond to anything depending on how the fragment shader interprets it.
AnyAnyUser-defined fields which can be assigned any value.Custom fields can have any type and any name, but may not have a tag. The upper limit on the number of custom fields is not known. <TODO: Research>

<TODO: Complete this list>

Built-In

This structure is designed specifically for implementing image effects. See also vert_img.

 struct v2f_img 
 {
    float4 pos : SV_POSITION;
    half2 uv   : TEXCOORD0;
 };
 struct v2f_vertex_lit 
 {
   float2 uv	: TEXCOORD0;
   fixed4 diff	: COLOR0;
   fixed4 spec	: COLOR1;
 };  

<TODO: Complete list.>

Surface/Fragment Shader to Lighting Shader Structure (SurfaceOutput)

The third and final structure contains pixel values returned by either a surface or fragment shader. They are read as input to a lighting shader (such as Lambert, BlinnPhong or a custom lighting model) which then returns a single RGBA color value.

Format

 Structure:
 struct [Name]
 {
     [One or more Fields]
 };
 
 Field:
 [Type] [Name];

Note that tags are not used in SurfaceOutput structures.

Acceptable Fields

The following fields can be written in the structure in any order.

Type(s)NameDescriptionNotes
float3, fixed3, half3AlbedoThe reflectance color and intensity of diffuse lighting. Diffuse lighting approximates the appearance of rough surfaces. Diffuse lighting calculations are multiplied with this value.
float3, fixed3, half3NormalA vector representing the direction the surface is facing in screen space.
float3, fixed3, half3EmissionThe color and intensity of emissive lighting. The emissive color will appear even in a completely black scene with no lights. Emissive lighting appears as though light is being created from the surface itself and is generally the most apparent in the absence of light. Glow-in-the-dark objects and computer instruments are examples of surfaces which might use emissive lighting.
float, fixed, halfSpecularThe reflectance color and intensity of specular lighting. Specular lighting approximates the appearance of shiny surfaces. Specular lighting calculations are multiplied with this value.
float, fixed, halfGlossThe sharpness of specular lighting. The higher this value is, the smaller the specular highlights will be. The range is 0-1, where 1 creates a pin-point highlight, and 0 is broad/flat. <TODO: Determine the exponent values this range uses.>
float, fixed, halfAlphaUsed for transparency, if render states are set up for alpha blending and the lighting shader interprets it as transparency (and it does by default).
AnyAnyUser-defined fields which can be assigned any value.Custom fields can have any type and any name, but may not have a tag. The upper limit on the number of custom fields is not known. <TODO: Research>

<TODO: Can different types be used other than the ones listed? Example, Albedo using float4 instead of float3.>

Built-In

Default structure; must be used unless you have implemented your own custom lighting shader.

 struct SurfaceOutput
 {
     half3 Albedo;
     half3 Normal;
     half3 Emission;
     half Specular;
     half Gloss;
     half Alpha;
 };


Surface Shader input structure (Input)

The input structure Input generally has any texture coordinates needed by the shader. Texture coordinates must be named "uv" followed by texture name (or start it with "uv2" to use second texture coordinate set).

Additional values that can be put into Input structure:

  • float3 viewDir - will contain view direction, for computing Parallax effects, rim lighting etc.
  • float4 with COLOR semantic - will contain interpolated per-vertex color.
  • float4 screenPos - will contain screen space position for reflection effects. Used by WetStreet shader in Dark Unity for example.
  • float3 worldPos - will contain world space position.
  • float3 worldRefl - will contain world reflection vector if surface shader does not write to o.Normal. See Reflect-Diffuse shader for example.
  • float3 worldNormal - will contain world normal vector if surface shader does not write to o.Normal.
  • float3 worldRefl; INTERNAL_DATA - will contain world reflection vector if surface shader writes to o.Normal. To get the reflection vector based on per-pixel normal map, use WorldReflectionVector (IN, o.Normal). See Reflect-Bumped shader for example.
  • float3 worldNormal; INTERNAL_DATA - will contain world normal vector if surface shader writes to o.Normal. To get the normal vector based on per-pixel normal map, use WorldNormalVector (IN, o.Normal).

Functions

ShaderLab comes packaged with built-in, or "intrinsic" functions. Many of them are based on the intrinsic functions provided by shader languages like CG, GLSL and HLSL, while others are unique to ShaderLab.

<TODO: Complete this section.>

See Also

Preprocessor Directives

Preprocessor directives are special statements which tell the compiler specifically how to handle the code. They are similar to tags and render states. Below is a list of different directives:

Preprocessor DirectiveOptionArgumentDescriptionNotes
#include(Path of filename in quotations)Includes code written in another file with the extension .cginc. For example,#include "UnityCG.cginc"is commonly used and contains several helper functions. You may write your own CGINC files as well. SeeBuilt-In CGINC files for a list of include files already provided by Unity.
#pragmatarget2.0 or defaultCompiles the shader under shader model 2. Model 2 has more limitations than 3 but is more compatible. Uses shader model 1.1 for vertex shaders.Vertex: 128 instruction limit. Fragment: 96 instruction limit (32 texture + 64 arithmetic), 16 temporary registers and 4 texture indirections.
3.0Compiles the shader under shader model 3. Model 3 is more powerful and flexible than 2 but is less compatible.Vertex: no instruction limit. Fragment: 1024 instruction limit (512 texture + 512 arithmetic), 32 temporary registers and 4 texture indirections. It is possible to override these limits using#pragma profileoptiondirective. For example, #pragma profileoption MaxTexIndirections=256raises texture indirections limit to 256. See #pragma profileoption for more information. Note that some shader model 3.0 features, like derivative instructions, aren't supported by vertex or fragment shaders. You can use #pragma glsl to translate to GLSL instead which has fewer restrictions. See#pragma glsl for more information.
surface(Name of surface shader)Tells the compiler which function is meant to be used as a surface shader.When writing custom surface shaders, this option MUST be written, and it MUST be written first.
(Name of lighting shader, minus the "Lighting" prefix. For example "LightingCookTorrence()" would be supplied here as "CookTorrence".)Tells the compiler which function is meant to be used as a lighting model. See Built-In lighting modelsfor a list of lighting models already provided by Unity. You may write your own lighting models as well.When writing custom surface shaders, this option MUST be written, and it MUST be written second.
alphaTest:(Property Name)Similar to therender stateAlphaTest, except it only culls alpha values less than or equal to the provided value.Both the alpha test render state and preprocessor directive can be used together although their interaction is unclear. Unlike AphaTest, you may only use properties (like _Cutoff) and not constants (like 0.5).
vertex(Name of vertex shader)Tells the compiler which function is meant to be used as a vertex shader.When writing custom vertex or fragment shaders with #pragma target 3.0 the compiler MUST know which vertex shader to use. You may provide your own vertex shader but if not you may use one of Unity's built in vertex shaders.
fragment(Name of fragment shader)Tells the compiler which function is meant to be used as a fragment shader.When writing custom vertex or fragment shaders with #pragma target 3.0 this directive MUST be written. This option MUST be written first with any shader model. You may provide your own fragment shader but if not you may use one of Unity's built in fragment shaders.
vertex:(Name of vertex shader)Tells the compiler which function is meant to be used as a vertex shader.When writing custom vertex or fragment shaders with #pragma target 3.0 the compiler MUST know which vertex shader to use. You may provide your own vertex shader but if not you may use one of Unity's built in vertex shaders.
fragmentoption<TODO: Add option here.><TODO: Add description here.><TODO: Add option notes here.>This directive has no effect on vertex programs or programs that are compiled to non-OpenGL targets.
<TODO: Add option here.><TODO: Add description here.><TODO: Add option notes here.>
only_renderers
exclude_renderers
glsl
profileoption

See Also


반응형

'Unity3D > Shader' 카테고리의 다른 글

Unity3d Shader Syntax Highlighting(Visual Studio 2010 또는 2012)  (0) 2014.07.21
Unity Shader 공부  (0) 2014.07.16
유니티 셰이더의 기초  (0) 2014.06.28
Unity Shader Reference  (0) 2014.06.24
Rendering Order - Queue tag  (0) 2014.06.24
Posted by blueasa
, |


Link : https://github.com/sromku/android-simple-facebook

반응형
Posted by blueasa
, |


Link : https://nodejstools.codeplex.com/

반응형

'Server > Node.js' 카테고리의 다른 글

Unity3d + Node.js 연동 테스트  (0) 2014.06.28
Node.js의 문서의 한글 번역본  (0) 2014.06.21
Node.js  (0) 2014.06.21
Posted by blueasa
, |

[추가]

Google NTP 주소 : time.google.com

[링크] https://developers.google.com/time/



C# - Simple Network Time (NTP) Protocol Client

SNTPClient.cs






Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP on port 123 as its transport layer. It is designed particularly to resist the effects of variable latency by using a jitter buffer. NTP also refers to a reference software implementation that is distributed by the NTP Public Services Project.

NTP is one of the oldest Internet protocols still in use (since before 1985). NTP was originally designed by Dave Mills of the University of Delaware, who still maintains it, along with a team of volunteers.

NTP is not related to the simpler DAYTIME (RFC 867) and TIME (RFC 868) protocols.

 

위키에서 가져옴-_-

 

경로 : http://en.wikipedia.org/wiki/Network_Time_Protocol

 

 

서버 따위에서 시간을 맞추기 위해서 사용하는 프로토콜이고 이런 시간 정보를 제공하는 서버를 타임 서버라고 많이들 이야길 하죠..

 

아래  ITS 는 아주 간단하게 구현되고 사용할 수 있지만 NTP 는 좀 까다롭습니다. -_-

 

그래서 괜히 어설프게 문서 만들고 예제 만들다간 욕 처먹을거 같아서 -.- 클래스 퍼온거 올려봅니다.

 

(원래는 간단하게 -_- 만들고 있었는데 제대로 된 소스를 발견해서 쪽팔려서 지움..;; -_- )

 

 

일단 아래는 활용 예제와 결과물입니다. 

 

namespace InternetTime

{

    using System;

 

    public class Synchronizer

    {

        public Synchronizer()

        {

        }

 

        public static int Main(string[] args)

        {

            SNTPClient client;

            try

            {

                client = new SNTPClient("time.google.com"); // Google NTP 서버 주소 추가

                //client = new SNTPClient("time.nuri.net");    // 참조할 NTP 서버 주소

                client.Connect(false);

            }

            catch (Exception e)

            {

                Console.WriteLine("ERROR: {0}", e.Message);

                return -1;

            }

 

            Console.Write(client.ToString());

            return 0;

        }

    }

}



출처 : http://www.devpia.com/Maeul/Contents/Detail.aspx?BoardID=18&MAEULNO=8&no=1770&page=11




반응형

'Programming > C#' 카테고리의 다른 글

Get Dictionary key by using the dictionary value  (0) 2014.08.12
[C#] How to get/set using index for a Dictionary?  (0) 2014.08.06
C# 외부 프로그램 종료하기  (0) 2014.05.20
C# Keywords  (0) 2014.05.13
Standard Numeric Format Strings  (0) 2014.05.13
Posted by blueasa
, |

Homepage : http://www.autohotkey.com/


AutoHotKey를 사용하는 사람들 : http://www.autohotkey.co.kr/


노가다는 이제 그만, AutoHotKey : http://blog.daum.net/miriya/15600728

반응형

'Utility > AutoHotKey' 카테고리의 다른 글

화면의 특정 버튼 클릭하기. (Imagesearch)  (0) 2014.08.19
Posted by blueasa
, |

여차저차해서 ARM Translation 1.1 깔고(이걸 안까니 구글 스토어에서 일부 앱이 지원안한다면서 안받아짐..)


구글스토어 깔고..


이제 되나 했더만, 어플 깔고 실행하니 'xxx(이)가 중지되었습니다.'라는 메시지가 너무 자주 떠서 구글링 해보니 


버추얼박스 최신버전이 지니모션과 호환이 별로 안좋나보다..


참조 링크에서 추천한대로 VirtualBox 4.1.32로 다운그레이드(처음엔 최신 4.3.12 깔았음.)하니 에러메시지 없이 잘된다.




참조 : 지니모션과 버추얼박스 오류 정보와 해결을 위한 점검 순서

반응형
Posted by blueasa
, |


링크 : http://la-stranger.tistory.com/20

반응형
Posted by blueasa
, |