AActor An AActor is an object that is meant to be part of the gameplay experience. AActors are either placed in a level by a designer or created at runtime via gameplay systems. All objects that can be placed into a level extend from this class. Examples include AStaticMeshActor, ACameraActor, and APointLight actors. AActor derives from UObject, so enjoys all of the standard features listed in the previous section. AActors can be explicitly destroyed via gameplay code (C++ or Blueprints) or via the standard garbage collection mechanism when the owning level is unloaded from memory. AActors are responsible for the high-level behaviors of your game’s objects. AActors are also the base type that can be replicated during networking. During network replication, AActors can also distribute information for any UActorComponents owned by that AActor that require network support. AActors have their own behaviors (specialization through inheritance), but they also act as containers for a hie...
단순히 생성자를 생성 해 두고 생성자를 위임 함으로서 중복 코드를 막는 기능을 테스트 해보았다. #include <string> #include <iostream> class Test { private: public: Test () { //runf } Test ( int A ) : Test () { } }; class Employee { private: int m_ID ; std :: string m_Name ; public: Employee ( int id , const std :: string & name ) : m_ID ( id ), m_Name ( name ) { std :: cout << "Employee" << m_Name << "created. \n " << std :: endl ; } Employee ( const std :: string & name ) : Employee ( 0 , name ) { } }; int main () { }
내가 만들엇지만 나름 잘만든 것 같다. (위사진은 왼쪽이 cook-torrance방식이고 가운데가 standard 왼쪽이 내가 만든 custom phong shading이다.) 회사 디자이너 분들에게 물어봤을때 오른쪽에 내가 만든 쉐이더가 제일 이쁘다고 했다 ! yeah~~ ! 비용도 프로파일러로 GPU profiling했을때 standard의 절반정도 비용으로 나온다. Nice~! 아래는 왼쪽이 standard pbr(GGX) shading 이고 오른쪽이 customize 한 phong shading으로 만든 것이다 퀄리티는 거의 흡사하지만 퍼포먼스는 확실히 많이 개선 됬으며 필요로 하게 되는 texture 의 수는 standard = 5/ custom = 2 로 확연히 줄었다. Sample code 계속해서 발전 시켜보고 있다. (UTF-8 이 왜 풀렸는지.. 한글이 날라갔다 ㄷㄷ) // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' Shader "Custom/Phong" { Properties { _DiffuseSampler("DiffuseTexture", 2D) = "white"{} _DiffuseColor("DiffuseColor", Color) = (0.5,0.5,0.5,1) _DiffuseStr("Diffuse Strength", Float) = 1 _DiffusePow("Diffuse Power", Float) = 1 _BaseLerp("Base Lerp", Float) =1 _ShadeColor("ShadeColor", Color) = (0.5,0.5,0.5,1) _Sha...
댓글
댓글 쓰기