?xml version="1.0" encoding="utf-8"?>

Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

 <PropertyGroup>
   <Configuration Condition=" '$(Configuration)' == '' ">Development</Configuration>
   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
   <ProductVersion>9.0.30729</ProductVersion>
   <SchemaVersion>2.0</SchemaVersion>
   <ProjectGuid>{FD7C5E1A-CFE4-4FD5-A525-1EB1599A39AC}</ProjectGuid>
   <OutputType>Exe</OutputType>
   <AppDesignerFolder>Properties</AppDesignerFolder>
   <RootNamespace>UnrealBuildTool</RootNamespace>
   <AssemblyName>UnrealBuildTool</AssemblyName>
   <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
   <IsWebBootstrapper>false</IsWebBootstrapper>
   <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
   <FileUpgradeFlags>
   </FileUpgradeFlags>
   <OldToolsVersion>3.5</OldToolsVersion>
   <UpgradeBackupLocation />
   <TargetFrameworkProfile>
   </TargetFrameworkProfile>
   <PublishUrl>publish\</PublishUrl>
   <Install>true</Install>
   <InstallFrom>Disk</InstallFrom>
   <UpdateEnabled>false</UpdateEnabled>
   <UpdateMode>Foreground</UpdateMode>
   <UpdateInterval>7</UpdateInterval>
   <UpdateIntervalUnits>Days</UpdateIntervalUnits>
   <UpdatePeriodically>false</UpdatePeriodically>
   <UpdateRequired>false</UpdateRequired>
   <MapFileExtensions>true</MapFileExtensions>
   <ApplicationRevision>0</ApplicationRevision>
   <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
   <UseApplicationTrust>false</UseApplicationTrust>
   <BootstrapperEnabled>true</BootstrapperEnabled>
 </PropertyGroup>
 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Development|AnyCPU' ">
   <DebugType>pdbonly</DebugType>
   <Optimize>true</Optimize>
   <OutputPath>..\..\..\Binaries\DotNET\</OutputPath>
   <DefineConstants>TRACE</DefineConstants>
   <Optimize>false</Optimize>
   <DebugType>pdbonly</DebugType>
   <PlatformTarget>AnyCPU</PlatformTarget>
   <ErrorReport>prompt</ErrorReport>
   <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
   <Prefer32Bit>false</Prefer32Bit>
   <UseVSHostingProcess>false</UseVSHostingProcess>
 </PropertyGroup>
 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <OutputPath>..\..\..\Binaries\DotNET\</OutputPath>
   <DefineConstants>DEBUG;TRACE</DefineConstants>
   <Optimize>false</Optimize>
   <DebugType>pdbonly</DebugType>
   <PlatformTarget>AnyCPU</PlatformTarget>
   <ErrorReport>prompt</ErrorReport>
   <Prefer32Bit>false</Prefer32Bit>
 </PropertyGroup>
 <ItemGroup>
   <Reference Include="Ionic.Zip.Reduced">
     <HintPath>..\..\..\Binaries\DotNET\Ionic.Zip.Reduced.dll</HintPath>
     <Private>False</Private>
   </Reference>
   <Reference Include="RPCUtility">
     <HintPath>..\..\..\Binaries\DotNET\RPCUtility.exe</HintPath>
     <Private>False</Private>
   </Reference>
   <Reference Include="System" />
   <Reference Include="System.Core">
     <RequiredTargetFramework>3.5</RequiredTargetFramework>
   </Reference>
   <Reference Include="System.Data" />
   <Reference Include="System.Management" />
   <Reference Include="System.Web.Extensions" />
   <Reference Include="System.Windows.Forms" />
   <Reference Include="System.Xml" />
   <Reference Include="System.Xml.Linq" />
 </ItemGroup>
 <Choose>
   <When Condition="Exists('XboxOne\UEBuildXboxOne.cs')">
     <ItemGroup>
       <Compile Include="XboxOne\UEBuildXboxOne.cs" />
       <Compile Include="XboxOne\XboxOneToolChain.cs" />
       <Compile Include="XboxOne\XboxOneDeploy.cs" />
       <Compile Include="XboxOne\XboxOneProjectGenerator.cs" />
       <Compile Include="XboxOne\XboxOneResourceGenerator.cs" />
       <Compile Include="XboxOne\XboxOneManifestGenerator.cs" />
     </ItemGroup>
   </When>
 </Choose>
 <Choose>
   <When Condition="Exists('Switch\UEBuildSwitch.cs')">
     <ItemGroup>
       <Compile Include="Switch\UEBuildSwitch.cs" />
       <Compile Include="Switch\SwitchToolChain.cs" />
       <Compile Include="Switch\UEDeploySwitch.cs" />
       <Compile Include="Switch\SwitchProjectGenerator.cs" />
     </ItemGroup>
   </When>
 </Choose>
 <Choose>
   <When Condition="Exists('PS4\UEBuildPS4.cs')">
     <ItemGroup>
       <Compile Include="PS4\PS4ProjectGenerator.cs" />
       <Compile Include="PS4\PS4ToolChain.cs" />
       <Compile Include="PS4\UEBuildPS4.cs" />
       <Compile Include="PS4\UEDeployPS4.cs" />
     </ItemGroup>
   </When>
 </Choose>
 <ItemGroup>
   <Compile Include="Configuration\ModuleRules.cs" />
   <Compile Include="Configuration\TargetInfo.cs" />
   <Compile Include="Configuration\TargetRules.cs" />
   <Compile Include="Mac\MacToolChain.cs" />
   <Compile Include="Mac\UEBuildMac.cs" />
   <Compile Include="Mac\MacProjectGenerator.cs" />
   <Compile Include="Mac\UEDeployMac.cs" />
   <Compile Include="System\ConfigCache.cs" />
   <Compile Include="System\ConfigFile.cs" />
   <Compile Include="System\ConfigFileAttribute.cs" />
   <Compile Include="System\ConfigHierarchy.cs" />
   <Compile Include="System\CustomBuildSteps.cs" />
   <Compile Include="System\FileSystemReference.cs" />
   <Compile Include="System\InstalledPlatformInfo.cs" />
   <Compile Include="System\LocalizationDescriptor.cs" />
   <Compile Include="System\ObsoleteOverrideAttribute.cs" />
   <Compile Include="System\RulesAssembly.cs" />
   <Compile Include="System\SupportedConfigurationsAttribute.cs" />
   <Compile Include="System\SupportedPlatformsAttribute.cs" />
   <Compile Include="System\TargetReceipt.cs" />
   <Compile Include="System\VersionManifest.cs" />
   <Compile Include="ToolChain\AppleToolChain.cs" />
   <Compile Include="TVOS\TVOSProjectGenerator.cs" />
   <Compile Include="TVOS\TVOSToolChain.cs" />
   <Compile Include="TVOS\UEBuildTVOS.cs" />
   <Compile Include="TVOS\UEDeployTVOS.cs" />
   <Compile Include="Android\UEBuildAndroid.cs" />
   <Compile Include="Android\UEDeployAndroid.cs" />
   <Compile Include="Android\AndroidAARHandler.cs" />
   <Compile Include="Android\AndroidToolChain.cs" />
   <Compile Include="Android\AndroidProjectGenerator.cs" />
   <Compile Include="System\UnrealPluginLanguage.cs" />
 </ItemGroup>
 <ItemGroup>
   <Compile Include="Utilities\BinaryReaderExtensions.cs" />
   <Compile Include="Utilities\BinaryWriterExtensions.cs" />
   <Compile Include="Utilities\HashSetExtensions.cs" />
   <Compile Include="Windows\WindowsDeploy.cs" />
   <Compile Include="Windows\WinResources.cs" />
 </ItemGroup>
 <ItemGroup>
   <Compile Include="IOS\IOSProjectGenerator.cs" />
   <Compile Include="IOS\IOSToolChain.cs" />
   <Compile Include="IOS\UEBuildIOS.cs" />
   <Compile Include="IOS\UEDeployIOS.cs" />
 </ItemGroup>
 <ItemGroup>
   <Compile Include="HTML5\HTML5ProjectGenerator.cs" />
   <Compile Include="HTML5\HTML5ToolChain.cs" />
   <Compile Include="HTML5\UEBuildHTML5.cs" />
   <Compile Include="HTML5\HTML5SDKInfo.cs" />
 </ItemGroup>
 <ItemGroup>
   <Compile Include="Linux\LinuxProjectGenerator.cs" />
   <Compile Include="Linux\LinuxToolChain.cs" />
   <Compile Include="Linux\UEBuildLinux.cs" />
 </ItemGroup>
 <Choose>
   <When Condition="Exists('System\NotForLicensees\TelemetryProviderET.cs')">
     <ItemGroup>
       <Compile Include="System\NotForLicensees\TelemetryProviderET.cs" />
     </ItemGroup>
   </When>
 </Choose>
 <ItemGroup>
   <Compile Include="..\DotNETCommon\MetaData.cs">
     <Link>Properties\MetaData.cs</Link>
   </Compile>
   <Compile Include="Configuration\UEBuildClient.cs" />
   <Compile Include="Configuration\UEBuildDeploy.cs" />
   <Compile Include="Configuration\UEBuildBinary.cs" />
   <Compile Include="Configuration\UEBuildEditor.cs" />
   <Compile Include="Configuration\UEBuildGame.cs" />
   <Compile Include="Configuration\UEBuildModule.cs" />
   <Compile Include="Configuration\UEBuildPlatform.cs" />
   <Compile Include="Configuration\UEBuildServer.cs" />
   <Compile Include="fastJSON\Formatter.cs" />
   <Compile Include="fastJSON\Getters.cs" />
   <Compile Include="fastJSON\JSON.cs" />
   <Compile Include="fastJSON\JsonParser.cs" />
   <Compile Include="fastJSON\JsonSerializer.cs" />
   <Compile Include="fastJSON\Reflection.cs" />
   <Compile Include="fastJSON\SafeDictionary.cs" />
   <Compile Include="Properties\AssemblyInfo.cs" />
   <Compile Include="Configuration\UEBuildConfiguration.cs" />
   <Compile Include="Configuration\UEBuildTarget.cs" />
   <Compile Include="System\ActionGraph.cs" />
   <Compile Include="System\ActionHistory.cs" />
   <Compile Include="System\BuildException.cs" />
   <Compile Include="Configuration\BuildConfiguration.cs" />
   <Compile Include="System\BuildHostPlatform.cs" />
   <Compile Include="System\FlatCPPIncludeDepencencyCache.cs" />
   <Compile Include="System\Distcc.cs" />
   <Compile Include="System\CodeLiteGenerator.cs" />
   <Compile Include="System\CodeLiteProject.cs" />
   <Compile Include="System\KDevelopGenerator.cs" />
   <Compile Include="System\CMakefileGenerator.cs" />
   <Compile Include="System\ModuleDescriptor.cs" />
   <Compile Include="System\PluginDescriptor.cs" />
   <Compile Include="System\ProjectDescriptor.cs" />
   <Compile Include="System\QMakefileGenerator.cs" />
   <Compile Include="System\MakefileGenerator.cs" />
   <Compile Include="System\SNDBS.cs" />
   <Compile Include="System\VCSolutionOptions.cs" />
   <Compile Include="System\DirectoryLookupCache.cs" />
   <Compile Include="System\CPPEnvironment.cs" />
   <Compile Include="System\CPPHeaders.cs" />
   <Compile Include="System\DependencyCache.cs" />
   <Compile Include="System\DynamicCompilation.cs" />
   <Compile Include="System\ExternalExecution.cs" />
   <Compile Include="System\FileItem.cs" />
   <Compile Include="System\JunkDeleter.cs" />
   <Compile Include="System\LinkEnvironment.cs" />
   <Compile Include="System\LocalExecutor.cs" />
   <Compile Include="System\Plugins.cs" />
   <Compile Include="System\Project.cs" />
   <Compile Include="System\ProjectFileGenerator.cs" />
   <Compile Include="System\ResponseFile.cs" />
   <Compile Include="System\RPCUtilHelper.cs" />
   <Compile Include="System\RulesCompiler.cs" />
   <Compile Include="System\SourceFileSearch.cs" />
   <Compile Include="System\Telemetry.cs" />
   <Compile Include="System\ThirdPartyHeaderFinder.cs" />
   <Compile Include="System\UEPlatformProjectGenerator.cs" />
   <Compile Include="System\Unity.cs" />
   <Compile Include="System\UnrealBuildTool.cs" />
   <Compile Include="System\UProjectInfo.cs" />
   <Compile Include="System\Utils.cs" />
   <Compile Include="System\VCProject.cs" />
   <Compile Include="System\VCProjectFileGenerator.cs" />
   <Compile Include="System\XcodeProject.cs" />
   <Compile Include="System\XcodeProjectFileGenerator.cs" />
   <Compile Include="ToolChain\RemoteToolChain.cs" />
   <Compile Include="ToolChain\UEToolChain.cs" />
   <Compile Include="System\XGE.cs" />
   <Compile Include="Utilities\DictionaryExtensions.cs" />
   <Compile Include="Utilities\GraphVisualization.cs">
     <SubType>Code</SubType>
   </Compile>
   <Compile Include="Utilities\JsonObject.cs" />
   <Compile Include="Utilities\XmlConfigLoader.cs" />
   <Compile Include="Windows\UEBuildWindows.cs" />
   <Compile Include="Windows\VCEnvironment.cs" />
   <Compile Include="Windows\VCToolChain.cs" />
   <Compile Include="Windows\WindowsProjectGenerator.cs" />
 </ItemGroup>
 <ItemGroup>
   <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
     <Visible>False</Visible>
     <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
     <Install>false</Install>
   </BootstrapperPackage>
   <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
     <Visible>False</Visible>
     <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
     <Install>true</Install>
   </BootstrapperPackage>
   <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
     <Visible>False</Visible>
     <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
     <Install>false</Install>
   </BootstrapperPackage>
   <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
     <Visible>False</Visible>
     <ProductName>.NET Framework 3.5</ProductName>
     <Install>false</Install>
   </BootstrapperPackage>
   <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
     <Visible>False</Visible>
     <ProductName>.NET Framework 3.5 SP1</ProductName>
     <Install>false</Install>
   </BootstrapperPackage>
 </ItemGroup>
 <ItemGroup>
   <None Include="app.config" />
 </ItemGroup>
 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
      Other similar extension points exist, see Microsoft.Common.targets.
 <Target Name="BeforeBuild">
 </Target>
 <Target Name="AfterBuild">
 </Target>
 -->
 <PropertyGroup>
   <PostBuildEvent>
   </PostBuildEvent>
   <PreBuildEvent>
   </PreBuildEvent>
 </PropertyGroup>
 <ItemGroup>
   <ProjectReference Include="..\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj">
     <Project>{5d7d66e8-8c76-4af9-b3ec-2ef03421d730}</Project>
     <Name>DotNETUtilities</Name>
   </ProjectReference>
 </ItemGroup>

/Project>

  • -
    UE4.15.1で検証

参考

メモ

  • EMaterialProperty - MP_MAXは33が限界。Uint32でビットマスクにして使っている。

やってみた

  1. Engine\Source\Runtime\Engine\Public\SceneTypes.h
    1. enum EMaterialProperty
       
       
       
      
      #spanend
       MP_PixelDepthOffset,
      #spanadd

      の下に追加分
  2. Engine\Source\Runtime\Engine\Classes\Materials\Material.h
     
     
     
    
    #spanend
     FScalarMaterialInput PixelDepthOffset;
    #spanadd

    の下に追加するパラメーターの変数を追加する
     
     
     
     
    
    #spanend
     UPROPERTY()
     FScalarMaterialInput CellShadeParam;
    #spanadd
    • FScalarMaterialInput
    • FVector2MaterialInput
    • FVectorMaterialInput
  3. Engine\Source\Runtime\Engine\Private\Materials\Material.cpp
    1. void UMaterial::Serialize(...)
       
       
       
      
      #spanend
       static_assert(MP_MAX == 29,
      #spanadd

      を追加した分のMP_MAX値にする
       
       
       
      
      #spanend
       static_assert(MP_MAX == 33, 
      #spanadd
    2. UMaterial::PostLoad()
       
       
       
      
      #spanend
       DoMaterialAttributeReorder(&PixelDepthOffset, UE4Ver);
      #spanadd

      の下に追加分
       
       
       
      
      #spanend
       DoMaterialAttributeReorder(&CellShadeParam, UE4Ver);
      #spanadd
    3. FExpressionInput* UMaterial::GetExpressionInputForProperty(...)
       
       
       
      
      #spanend
       case MP_PixelDepthOffset:        return &PixelDepthOffset;
      #spanadd

      の下に追加分
       
       
       
      
      #spanend
       case MP_CellShadeParam:            return &CellShadeParam;
      #spanadd
    4. UMaterial::CompilePropertyEx
       
       
       
      
      #spanend
       case MP_PixelDepthOffset:        return PixelDepthOffset.CompileWithDefault(Compiler, Property);
      #spanadd

      の下に追加分
       
       
       
      
      #spanend
       case MP_CellShadeParam:            return CellShadeParam.CompileWithDefault(Compiler, Property);
      #spanadd
    5. bool UMaterial::IsPropertyActive(EMaterialProperty InProperty) const
       
       
       
       
       
      
      #spanend
       case MP_PixelDepthOffset:
           Active = !bIsTranslucentBlendMode;
           break;
      #spanadd

      の下に追加。このピンを使用するShadingModelを記述する。
       
       
       
       
       
      
      #spanend
       case MP_CellShadeParam:
           Active = ShadingModel == MSM_Cell || ShadingModel == MSM_CellSaturation || ShadingModel == MSM_CellEye || ShadingModel == MSM_CellHair || ShadingModel == MSM_CellHairSaturation || ShadingModel == MSM_CellOutline;
           break;
      #spanadd
  4. Engine\Source\Runtime\Engine\Private\Materials\MaterialExpressions.cpp
    1. int32 UMaterialExpressionMakeMaterialAttributes::Compile(...)
    2. UMaterialExpressionBreakMaterialAttributes::UMaterialExpressionBreakMaterialAttributes(...)
       
       
       
      
      #spanend
       static_assert(MP_MAX == 29,
      #spanadd

      を追加した分のMP_MAX値にする
       
       
       
      
      #spanend
       static_assert(MP_MAX == 33,
      #spanadd
    3. UMaterialExpressionBreakMaterialAttributes::UMaterialExpressionBreakMaterialAttributes
       
       
       
      
      #spanend
       Outputs.Add(FExpressionOutput(TEXT("PixelDepthOffset"), 1, 1, 1, 1, 0));
      #spanadd

      の下に追加分。
       
       
       
      
      #spanend
       Outputs.Add(FExpressionOutput(TEXT("CellShadeParam"), 1, 1, 1, 1, 0));
      #spanadd
    4. int32 UMaterialExpressionBreakMaterialAttributes::Compile
       
       
       
      
      #spanend
       PropertyToIOIndexMap.Add(MP_PixelDepthOffset, 24);
      #spanadd

      の下に追加分
       
       
       
      
      #spanend
       PropertyToIOIndexMap.Add(MP_CellShadeParam, 25);
      #spanadd
  5. Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp
    1. void FMaterialAttributeDefinitionMap::InitializeAttributeMap()
       
       
       
      
      #spanend
       Add(FGuid(0x0AC97EC3, 0xE3D047BA, 0xB610167D, 0xC4D919FF), TEXT("PixelDepthOffset"),        MP_PixelDepthOffset,        MCT_Float1,    FVector4(0,0,0,0), SF_Pixel);
      #spanadd

      の下に追加分。GUIDは被ってはいけない。ピンの初期値もここ。
       
       
       
      
      #spanend
       Add(FGuid(0x0AC97EC4, 0xE3D047BE, 0xB610168C, 0xC4D91203), TEXT("CellShadeParam"), MP_CellShadeParam, MCT_Float4, FVector4(0, 1, 0, 0), SF_Pixel);
      #spanadd
  6. Engine\Source\Runtime\Engine\Classes\Materials\MaterialExpressionMakeMaterialAttributes.h
     
     
     
    
    #spanend
     FExpressionInput PixelDepthOffset;
    #spanadd

    の下に追加するパラメーターの変数を追加する
     
     
     
     
    
    #spanend
     UPROPERTY()
     FExpressionInput CellShadeParam;
    #spanadd
  7. Engine\Source\Runtime\Engine\Private\Materials\HLSLMaterialTranslator.h
    1. FHLSLMaterialTranslator(...)
       
       
       
      
      #spanend
       SharedPixelProperties[MP_PixelDepthOffset] = true;
      #spanadd

      の下に追加するパラメーターの分初期化を追加
       
       
       
      
      #spanend
       SharedPixelProperties[MP_CellShadeParam] = true;
      #spanadd
    2. bool Translate()
       
       
       
      
      #spanend
       Chunk[MP_PixelDepthOffset] = Material->CompilePropertyAndSetMaterialProperty(MP_PixelDepthOffset,this);
      #spanadd

      の下に追加するパラメーターの分、値の取得を追加
       
       
       
      
      #spanend
       Chunk[MP_CellShadeParam] = Material->CompilePropertyAndSetMaterialProperty(MP_CellShadeParam, this);
      #spanadd
  8. Engine\Source\Editor\UnrealEd\Private\MaterialGraph.cpp
     
     
     
    
    #spanend
     MaterialInputs.Add(FMaterialInputInfo(LOCTEXT("PixelDepthOffset", "Pixel Depth Offset"), MP_PixelDepthOffset, LOCTEXT( "PixelDepthOffsetToolTip", "Pixel Depth Offset" ) ));
    #spanadd

    の下に追加
     
     
     
    
    #spanend
     MaterialInputs.Add(FMaterialInputInfo(LOCTEXT("CellShadeParam", "Cell Shading Param"), MP_CellShadeParam, LOCTEXT("CellShadeParamToolTip", "Cell Shading Param")));
    #spanadd
  9. シェーダーからマテリアルのパラメーターを取得する
    Engine\Shaders\MaterialTemplate.usf

    こんな感じ
     
     
    -
    |
    !
     
    -
    |
    !
     
    
    #spanend
     half4 GetMaterialCellShadeParamRaw(FPixelMaterialInputs PixelMaterialInputs)
     {
         return PixelMaterialInputs.CellShadeParam;
     }
     half4 GetMaterialCellShadeParam(FPixelMaterialInputs PixelMaterialInputs)
     {
         return GetMaterialCellShadeParamRaw(PixelMaterialInputs);
     }
    #spanadd

    ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS