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

카테고리

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

[링크] https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/upgrading-your-shaders.html#shader-mappings

 

Shader mappings

The following table shows which URP shaders the Built-in Render Pipeline shaders convert to when you use the Render Pipeline Converter.

Unity built-in shaderUniversal Render Pipeline shader
Standard Universal Render Pipeline/Lit
Standard (Specular Setup) Universal Render Pipeline/Lit
Standard Terrain Universal Render Pipeline/Terrain/Lit
Particles/Standard Surface Universal Render Pipeline/Particles/Lit
Particles/Standard Unlit Universal Render Pipeline/Particles/Unlit
Mobile/Diffuse Universal Render Pipeline/Simple Lit
Mobile/Bumped Specular Universal Render Pipeline/Simple Lit
Mobile/Bumped Specular(1 Directional Light) Universal Render Pipeline/Simple Lit
Mobile/Unlit (Supports Lightmap) Universal Render Pipeline/Simple Lit
Mobile/VertexLit Universal Render Pipeline/Simple Lit
Legacy Shaders/Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Bumped Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Bumped Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Self-Illumin/Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Self-Illumin/Bumped Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Self-Illumin/Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Self-Illumin/Bumped Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Bumped Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Bumped Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Cutout/Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Cutout/Specular Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Cutout/Bumped Diffuse Universal Render Pipeline/Simple Lit
Legacy Shaders/Transparent/Cutout/Bumped Specular Universal Render Pipeline/Simple Lit

 

반응형
Posted by blueasa
, |

[링크] https://wincnt-shim.tistory.com/356

 

기존 프로젝트를 URP로 변경하기

서론 이전에 빌트인으로 만들었던 프로젝트를 URP로 변경해보려고 한다 매우 간단한 프로젝트이라서 다른 변수가 영향을 주지 않으리라 생각한다 (참고로 설치하는 URP의 버전은 12.1) 방법은 Unity

wincnt-shim.tistory.com

 

[참고] Converting your shaders | Universal RP | 12.1.11

 

반응형
Posted by blueasa
, |
1
2
3
4
5
6
7
8
9
10
11
#include<string>
#include<iostream>

int main()
{
const char* charString= "Eggs on toast.";
 std::string someString(charString);

 std::cout << someString;
 return 0;
}

1
2
char *cStr = "C++";
std::string Str = std::string(cStr);


출처 :  http://www.cplusplus.com/forum/general/41912/
반응형
Posted by blueasa
, |
This EE article provides examples of conversion techniques for various types of string variables:  classic C-style strings, MFC/ATL CStrings, and STL's std::string data type.

Convert Integer to String


int to C-style (NULL-terminated char[]) string

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
int   n=1234567890;
char  szResult[12];

#include <stdio.h>
...
sprintf
(   szResult, "%d", n );               // use "%u" for unsigned int
sprintf_s
( szResult, sizeof(szResult), "%d", n );  // "safe" version

//------------------------------------- alternative: itoa
#include <stdlib.h>
...
_itoa
(   n, szResult, 10 );
_itoa_s
( n, szResult, sizeof(szResult), 10);    // "safe" version


int to ATL/MFC CString

1:
2:
3:
4:
5:
6:
#include <cstringt.h>
...
int     n;
CString sResult;

sResult
.Format( "%d", n );    // use "%u" for unsigned int


int to STL std::string

1:
2:
3:
4:
5:
6:
7:
8:
9:
#include <iostream>
#include <sstream>
...
int         n;
std
::string sResult;

std
::ostringstream ostr;
ostr
<< n;
sResult
= ostr.str();



Convert String to Integer


C-style (NULL-terminated char[]) string to int

1:
2:
3:
4:
5:
6:
#include <stdlib.h>
...
char szNumber[12]= "1234567890";
int  nResult;

nResult
= atoi( szNumber );


ATL/MFC CString to int

1:
2:
3:
4:
5:
6:
#include <cstringt.h>  
...
CString sNumber= "1234567890";
int     nResult;

nResult
= atoi( sNumber );  // automatically does LPCSTR(sNumber)


STL std::string to int

1:
2:
3:
4:
5:
6:
7:
#include <string>
#include <stdlib.h>
...
std
::string sNumber= "1234567890";
int         nResult;

nResult
= atoi( sNumber.c_str() );



Notes:
  • If you are using the UNICODE character set and supplying an output buffer (as with sprintf and itoa) you'll need to keep in mind that characters are two bytes long.  The normal procedure is to declare character buffers as the TCHAR data type, which will take into consideration the data element size.

  • Output buffer length.
    C++ integers are typically 32-bits, with values as high as billions; the range is:
    1:
    2:
    
                     0 to 4,294,967,295 (unsigned)
       
    -2,147,483,648 to 2,147,483,647 (signed)
    Thus, the maximum length of the resulting string is 12 characters (including NULL terminator and not including commas or other formatting). 

    If you are working with 64-bit integers (called __int64 or long long), the values are as high as quintillions; the range is:
    1:
    2:
    
                                 0 to 18,446,744,073,709,551,615 (unsigned)
       
    -9,223,372,036,854,775,808 to  9,223,372,036,854,775,807 (signed)
    Thus, the maximum length of the resulting string is 21 characters (including NULL terminator and not including commas or other formatting).

  • Both sprintf and itoa have been termed unsafe (some would say they've been deprecated, others would not use that term) because of the chance that a sloppy programmer might not provide a large enough output buffer.

    The examples show how to use the safer xxx_s variations of these functions as an alternative.  The older functions might write beyond the end of the buffer and stomp on other variables or blow the stack frame -- and cause endless debugging headaches.  Of course, if you are determined to give yourself grief, you can still blow up the "safe" version by passing in the wrong length value...  

    The CString::Format function allocates the buffer for you and takes care to avoid the buffer overrun problem.  The std::ostringstream << (insertion operator) also takes care of the buffer allocation for you.

  • The examples above compile and work under Microsoft VS2008.  Some Microsoft-specific functionality is implied (refer to the references, below, if you worry about these things).  However, there is an excellent chance that at least one of the variations will work for you in your development system, whatever it is.


References:

atoi, _atoi_l, _wtoi, _wtoi_l
http://msdn.microsoft.com/en-us/library/yd5xkb5c.aspx

sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l
http://msdn.microsoft.com/en-us/library/ybk95axf.aspx

_itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow
http://msdn.microsoft.com/en-us/library/yakksftt(VS.80).aspx

String to Numeric Value Functions  (strtoX, et al.)
http://msdn.microsoft.com/en-us/library/53b7b72e(VS.80).aspx

Data Conversion  (ultoX, etc.)
http://msdn.microsoft.com/en-us/library/0heszx3w(VS.80).aspx

CStringT::Format
http://msdn.microsoft.com/en-us/library/aa314327(VS.60).aspx

ostringstream
http://msdn.microsoft.com/en-us/library/6kacs5y3.aspx

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you liked this article and want to see more from this author,  please click the Yes button near the:
      Was this article helpful? 
label that is just below and to the right of this text.   Thanks!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 


출처 : 
http://blog.naver.com/wassupnari?Redirect=Log&logNo=100107651361  
반응형
Posted by blueasa
, |