{"id":243,"date":"2018-08-20T20:43:58","date_gmt":"2018-08-20T11:43:58","guid":{"rendered":"http:\/\/www.sciement.com\/tech-blog\/?p=243"},"modified":"2018-09-03T20:32:56","modified_gmt":"2018-09-03T11:32:56","slug":"structured_buffer_compute_shader_ue4_part1","status":"publish","type":"post","link":"https:\/\/www.sciement.com\/tech-blog\/c\/structured_buffer_compute_shader_ue4_part1\/","title":{"rendered":"[UE4][ComputeShader][HLSL][C++]Unreal Engine 4\u3067(RW)StructuredBuffer\u3092\u7528\u3044\u305fComputeShader\u3092\u5229\u7528\u3059\u308b\uff08\u305d\u306e\uff11\uff1a\u30a4\u30f3\u30c8\u30ed\uff09"},"content":{"rendered":"<p>Unity\u3067\u306fGPGPU\u3092\u30d5\u30eb\u6d3b\u7528\u3059\u308b\u305f\u3081\u306bComputeShader\u3092\u7528\u3044\u305f\u7f8e\u3057\u3044\u53ef\u8996\u5316\u4e8b\u4f8b\u304c\u305f\u304f\u3055\u3093\u3042\u308a\u3001\u7279\u306b<a href=\"https:\/\/indievisuallab.stores.jp\/\" rel=\"noopener\" target=\"_blank\"><strong>Indie Visual Lab<\/strong><\/a>\u3055\u3093\u306b\u3088\u308bUnity Graphics Programming (<a href=\"https:\/\/indievisuallab.stores.jp\/items\/59edf11ac8f22c0152002588\" rel=\"noopener\" target=\"_blank\"><strong>vol.1<\/strong><\/a>, <a href=\"https:\/\/indievisuallab.stores.jp\/items\/5ae077b850bbc30f3a000a6d\" rel=\"noopener\" target=\"_blank\"><strong>vol.2<\/strong><\/a>)\u306f\u7d20\u6674\u3089\u3057\u3044\u66f8\u7c4d\u3067\u3059\u3002<br \/>\n\u305d\u306e\u4ed6\u306b\u3082\u3001\u4f8b\u3048\u3070\u51f9\u307fTips\u3055\u3093\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u306a\u3069\u3001\u7d20\u6575\u306a\u89e3\u8aac\u8a18\u4e8b\u304c\u3044\u304f\u3064\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\u8a18\u4e8b\uff1a<br \/>\n<a href=\"http:\/\/tips.hecomi.com\/entry\/2016\/05\/08\/160626\" rel=\"noopener\" target=\"_blank\"><strong>Unity \u3067 Compute Shader \u3092\u4f7f\u3063\u305f\u30b9\u30af\u30ea\u30fc\u30f3\u30b9\u30da\u30fc\u30b9\u885d\u7a81\u6709\u308a\u306e GPU \u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u4f5c\u3063\u3066\u307f\u305f<\/strong><\/a><\/p>\n<p>\u3067\u3001\u305b\u3063\u304b\u304f\u306a\u306e\u3067Unreal Engine 4\u3067\u3082\u4f3c\u305f\u3088\u3046\u306a\u3053\u3068\u3092\u3084\u3063\u3066\u307f\u305f\u3044\u308f\u3051\u3067\u3059\u304c\u3001\u5c11\u306a\u304f\u3068\u3082\u79c1\u304c\u63a2\u3057\u305f\u9650\u308a\u3067\u306f\u3001\u60c5\u5831\u304c\u307b\u3063\u3063\u3063\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u305d\u3082\u305d\u3082\u306eComputeShader\u306e\u4f7f\u3044\u65b9\u81ea\u4f53\u306e\u89e3\u8aac\u8a18\u4e8b\u3082\u5c11\u306a\u3044\u306e\u3067\u3059\u304c\u3001Unreal Engine 4\u3067GPGPU\u95a2\u9023\u304c\u6d41\u884c\u3089\u306a\u3044\u7406\u7531\u306f\u3082\u30461\u3064\u3042\u308b\u3068\u601d\u3063\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\u305d\u308c\u306f\u3001<\/p>\n<p><strong>\u305f\u3068\u3048ComputeShader\u3092\u4f7f\u3063\u3066GPGPU\u3092\u6d3b\u304b\u3057\u305f\u6f14\u7b97\u304c\u51fa\u6765\u3066\u3082\u3001\u305d\u306e\u7d50\u679c\u3092\u76f4\u63a5\u8868\u793a\u3059\u308b\u305f\u3081\u306eAPI\u304cUnreal Engine 4\u306b\u306f\uff08\u304a\u305d\u3089\u304f\uff09\u5168\u304f\u306a\u3044<\/strong><\/p>\n<p>\u3053\u3068\u3067\u3059\u3002<br \/>\n\u3053\u308c\u3001\u6b8b\u5ff5\u904e\u304e\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070GPGPU\u3067\u8907\u96d1\u306a\u30e1\u30c3\u30b7\u30e5\u306e\u9802\u70b9\u5ea7\u6a19\u3092\u8a08\u7b97\u3057\u305f\u3068\u3057\u3066\u3001GPU\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u3092\u76f4\u63a5Unreal Engine 4\u306e\u63cf\u753b\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u6e21\u305b\u306a\u3044\u3068\u3044\u3046\u3001\u6fc0\u3057\u3044\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u306b\u76f4\u9762\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u306f\u3001Procedural Mesh Component\u3092\u6539\u9020\u3057\u3066\u3001\u76f4\u63a5GPU\u30e1\u30e2\u30ea\u30dd\u30a4\u30f3\u30bf\u3092\u6307\u5b9a\u51fa\u6765\u308b\u3088\u3046\u306b\u3059\u308b\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u5927\u91cf\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3084\u77e2\u5370\uff08\u6d41\u901f\u306e\u53ef\u8996\u5316\u306a\u3069\uff09\u3092\u8868\u793a\u3059\u308b\u969b\u306b\u306f\u3001Instanced Static Mesh\u306e\u5404\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e0\u5024\u3092GPU\u4e0a\u306e\u307f\u3067\u5b8c\u7d50\u3055\u305b\u3066\u9ad8\u901f\u63cf\u753b\u3092\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u305d\u306e\u65b9\u6cd5\u3082\uff08\u305f\u3076\u3093\uff09\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u8d85\u7121\u7406\u3084\u308a\u3084\u308d\u3046\u3068\u3059\u308b\u3068\u3001\u3053\u3061\u3089\u306e\u53c2\u8003\u8a18\u4e8b\u306e\u3088\u3046\u306a\u3053\u3068\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\u8a18\u4e8b\uff1a<br \/>\n<a href=\"https:\/\/qiita.com\/selflash\/items\/c937308299d93340f7c7\" rel=\"noopener\" target=\"_blank\"><strong>[UE4]\u30d6\u30eb\u30fc\u30d7\u30ea\u30f3\u30c8\u3060\u3051\u3067GPGPU\u3092\u3057\u3088\u3046 ~ \u305d\u306e1 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u3092\u5272\u308a\u632f\u308b ~<\/strong><\/a><br \/>\n<a href=\"https:\/\/qiita.com\/selflash\/items\/fab6289f00a4cc0d4b0c\" rel=\"noopener\" target=\"_blank\"><strong>[UE4]\u30d6\u30eb\u30fc\u30d7\u30ea\u30f3\u30c8\u3060\u3051\u3067GPGPU\u3092\u3057\u3088\u3046 ~ \u305d\u306e2 \u30c6\u30af\u30b9\u30c1\u30e3\u306b\u4f4d\u7f6e\u60c5\u5831\u3092\u66f8\u304d\u8fbc\u3082\u3046 ~<\/strong><\/a><br \/>\n<a href=\"https:\/\/qiita.com\/selflash\/items\/73cc7d0582b8dbb656c4\" rel=\"noopener\" target=\"_blank\"><strong>[UE4]\u30d6\u30eb\u30fc\u30d7\u30ea\u30f3\u30c8\u3060\u3051\u3067GPGPU\u3092\u3057\u3088\u3046 ~ \u305d\u306e3 \u6f14\u7b97\u306e\u7cbe\u5ea6\u3092\u4e0a\u3052\u3088\u3046 ~<\/strong><\/a><\/p>\n<p>\u30c6\u30af\u30b9\u30c1\u30e3\u5024\u3092\u7528\u3044\u308b\u3068\u3044\u3046\u53e4\u5178\u7684\u306a\u624b\u6cd5\u3067\u4f55\u3068\u304b\u3059\u308b\u3057\u304b\u306a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<br \/>\n\u6700\u65b0\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u3042\u308b<a href=\"https:\/\/docs.unrealengine.com\/en-us\/Engine\/Niagara\" rel=\"noopener\" target=\"_blank\">Niagara<\/a>\u3092\u4f7f\u3046\u3068\u4f55\u304b\u51fa\u6765\u305f\u308a\u3059\u308b\u2026\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u8abf\u3079\u3066\u3044\u306a\u3044\u306e\u3067\u308f\u304b\u308a\u307e\u305b\u3093\u3002<br \/>\n\u3054\u5b58\u77e5\u306e\u65b9\u304c\u3044\u3089\u3063\u3057\u3083\u3044\u307e\u3057\u305f\u3089\u305c\u3072\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30c6\u30af\u30b9\u30c1\u30e3\u306b\u5024\u3092\u66f8\u304d\u8fbc\u3080\u3068\u3053\u308d\u307e\u3067\u306fComputeShader\u3068Unreal C++\u3068\u3092\u3046\u307e\u304f\u7e4b\u3052\u308c\u3070GPU\u4e0a\u306e\u307f\u3067\u5b8c\u7d50\u3055\u305b\u308b\u3053\u3068\u3082\u3069\u3046\u3084\u3089\u51fa\u6765\u305d\u3046\u306a\u306e\u3067\u3059\u304c\u3001<br \/>\n\u4e0a\u8a18\u8a18\u4e8b\u3067\u3082\u6307\u6458\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001Unreal Engine\u306eInstanced Static Mesh\u306e\u5b9f\u88c5\u304c\u975e\u5e38\u306b\u4e2d\u9014\u534a\u7aef\u3067\u3001Instance ID\u306e\u53d6\u5f97\u3092BluePrints\u4e0a\u304b\u3089\u884c\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u305b\u3093\u3002<\/p>\n<p>\u4f55\u3068\u304b\u3084\u308d\u3046\u3068\u3059\u308b\u3068\u3001\u4e0a\u8a18\u8a18\u4e8b\u306e\u3088\u3046\u306a\u8d85\u7121\u7406\u3084\u308a\u306a\u5b9f\u88c5\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\u8a18\u4e8b\uff1a<br \/>\n<a href=\"https:\/\/answers.unrealengine.com\/questions\/463074\/per-instance-id-for-static-mesh-instances.html\" rel=\"noopener\" target=\"_blank\"><strong>Per Instance Id For Static Mesh Instances &#8211; UE4 AnswerHub<\/strong><\/a><\/p>\n<p>\u6642\u3005\u82f1\u8a9e\u30d5\u30a9\u30fc\u30e9\u30e0\u3067\u3082\u8cea\u554f\u3084\u8981\u671b\u304c\u51fa\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u63a1\u7528\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u304a\u305d\u3089\u304f\u306f<a href=\"http:\/\/api.unrealengine.com\/INT\/API\/Runtime\/Engine\/Components\/UInstancedStaticMeshComponent\/index.html\" rel=\"noopener\" target=\"_blank\"><strong>UInstancedStaticMeshComponent<\/strong><\/a>\u306e<a href=\"http:\/\/api.unrealengine.com\/INT\/API\/Runtime\/Engine\/Components\/UInstancedStaticMeshComponent\/UpdateInstanceTr-\/index.html\" rel=\"noopener\" target=\"_blank\"><strong>UInstancedStaticMeshComponent::UpdateInstanceTransform<\/strong><\/a>\u3042\u305f\u308a\u306e\u5b9f\u88c5\u3092\u898b\u3066\u6539\u9020\u3059\u308c\u3070\u51fa\u6765\u306a\u3044\u3053\u3068\u306f\u306a\u3044\u306e\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u2026\u3002\u5fc3\u304c\u6298\u308c\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u2026\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u73fe\u72b6Unreal Engine 4\u3067ComputeShader\u3092\u4f7f\u3048\u3066\u3082\u3001\u8996\u899a\u7684\u306a\u52b9\u679c\u3092\u5f97\u308b\u305f\u3081\u306b\u307e\u305f\u4e00\u82e6\u52b4\u3001\u3044\u3084\u4e94\u82e6\u52b4\u304f\u3089\u3044\u3057\u305d\u3046\u3067\u3059\u306e\u3067\u3042\u307e\u308a\u30e1\u30ea\u30c3\u30c8\u304c\u7121\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u305d\u308c\u3067\u3082\u30ed\u30b8\u30c3\u30af\u90e8\u5206\u3067\u5927\u91cf\u306e\u5358\u7d14\u8a08\u7b97\u3092GPU\u4e0a\u3067\u307e\u308f\u3057\u305f\u3044\u3068\u304d\u306a\u3069\u304c\u3042\u308c\u3070\uff08\u305d\u3057\u3066CPU, GPU\u9593\u306e\u8ee2\u9001\u6642\u9593\u3092\u8003\u616e\u3057\u3066\u3082GPGPU\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u306a\u3089\u3070\uff09\u3001\u4f7f\u3044\u65b9\u3092\u77e5\u3063\u3066\u304a\u304f\u3068\u826f\u3044\u306e\u304b\u306a\u3068\u601d\u3044\u3001\u516c\u5f0f\u8a18\u4e8b\u3084\u516c\u5f0f\u89e3\u8aac\u304c\u975e\u5e38\u306b\u8ca7\u5f31\u3067\u56f0\u308a\u3064\u3064\u3001\u6709\u5fd7\u306e\u65b9\u3005\u306b\u3088\u3063\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u6570\u5c11\u306a\u3044\u30b5\u30f3\u30d7\u30eb\u3092\u983c\u308a\u306b\u8a66\u884c\u932f\u8aa4\u3057\u305f\u7d50\u679c\u3001\u4f55\u3068\u306a\u304f\u4f7f\u3044\u65b9\u304c\u308f\u304b\u3063\u3066\u304d\u307e\u3057\u305f\u306e\u3067\u3001\u8d85\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u3068\u3068\u3082\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\u306b\u3057\u305f\u306e\u306f\u4ee5\u4e0b\u306e\u89e3\u8aac\u8a18\u4e8b\u53ca\u3073GitHub\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<\/p>\n<p>\u53c2\u8003\u8a18\u4e8b\uff1a<br \/>\n1. <a href=\"https:\/\/www.unrealengine.com\/ja\/blog\/how-to-add-global-shaders-to-ue4\" rel=\"noopener\" target=\"_blank\"><strong>UE4 \u306b\u30b0\u30ed\u30fc\u30d0\u30eb \u30b7\u30a7\u30fc\u30c0\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u307f\u3088\u3046<\/strong><\/a><\/p>\n<p>\u30d1\u30c3\u3068\u898b\u3067\u306f\u308f\u304b\u308a\u3084\u3059\u304f\u3066\u89aa\u5207\u306a\u8a18\u4e8b\u3067\u3001\u5b9f\u969b\u3001\u57fa\u672c\u3092\u5b66\u3076\u306b\u306f\u3068\u3066\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u75d2\u3044\u3068\u3053\u308d\u306b\u624b\u304c\u5c4a\u3044\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u4e0a\u8a18\u8a18\u4e8b\u4e2d\u306e\u30b3\u30fc\u30c9<\/p>\n<p> <span class=\"lang:default decode:true  crayon-inline \" >void RenderMyTest(FRHICommandList&amp; RHICmdList, ERHIFeatureLevel::Type FeatureLevel, const FLinearColor&amp; Color);<\/span><\/p>\n<p>\u306e\u3001FRHICommnadList\u3068ERHIFeatureLevel::Type\u3092\u3069\u3053\u304b\u3089\u3069\u3046\u3084\u3063\u3066\u53d6\u5f97\u3059\u308c\u3070\u3088\u3044\u306e\u304b\u5168\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u3002<br \/>\n\u307e\u305f\u3001\u540c\u3058\u304f\u4e0a\u8a18\u8a18\u4e8b\u4e2d\u306eFMyTestPS\u30af\u30e9\u30b9\u306f\u3001\uff08\u78ba\u304b\uff09UE4.18\u4ee5\u4e0a\u3001\u5c11\u306a\u304f\u3068\u3082UE4.19\u3067\u306f\u78ba\u5b9f\u306b\u69cb\u6587\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u8a73\u3057\u304f\u306f\u5f8c\u8ff0\u3057\u307e\u3059\u304c\u3001FGlobalShader\u30af\u30e9\u30b9\u306e\u4ed5\u69d8\u304c\u5909\u66f4\u306b\u306a\u3063\u3066\u304a\u308a\u3001<\/p>\n<p> <span class=\"lang:default decode:true  crayon-inline \" >static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment&amp; OutEnvironment);<\/span> <\/p>\n<p>\u3068\u66f8\u3044\u3066\u3082\u52d5\u304d\u307e\u305b\u3093\u3002<br \/>\n\u6b63\u3057\u304f\u306f<\/p>\n<p> <span class=\"lang:default decode:true  crayon-inline \" >static void ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters&amp; PermutationParams, FShaderCompilerEnvironment&amp; OutEnvironment);<\/span> <\/p>\n<p>\u306b\u5909\u66f4\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3057\u304b\u3082\u3001\u3053\u306e\u5909\u66f4\u3001\u516c\u5f0f\u8aac\u660e\u3092\u63a2\u3057\u3066\u3082\u898b\u3064\u304b\u3089\u305a\u3001\u5916\u90e8\u306e\u8a18\u4e8b\uff08<a href=\"http:\/\/rcaloca.blogspot.com\/2018\/01\/adding-global-shaders-to-ue4-v20.html\" rel=\"noopener\" target=\"_blank\"><strong>Adding Global shaders to UE4 v2.0<\/strong><\/a>\uff09\u3067\u3084\u3063\u3068\u308f\u304b\u308b\u3063\u3066\u3044\u3046\u2026\u3002<\/p>\n<p>2. <a href=\"http:\/\/api.unrealengine.com\/JPN\/Programming\/Rendering\/ShaderInPlugin\/QuickStart\/index.html\" rel=\"noopener\" target=\"_blank\"><strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u3057\u3066\u65b0\u898f\u30b0\u30ed\u30fc\u30d0\u30eb \u30b7\u30a7\u30fc\u30c0\u30fc\u3092\u4f5c\u6210\u3059\u308b | Unreal Engine<\/strong><\/a><\/p>\n<p>\u6700\u521d\u306e\u8a18\u4e8b\u3088\u308a\u305a\u3063\u3068\u8a73\u3057\u3044\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308aFGlobalShader\u306e\u8a18\u8ff0\u304c\u53e4\u3044\u307e\u307e\u3067\u3001\u5c11\u306a\u304f\u3068\u3082UE4.19\u4ee5\u4e0a\u3067\u306f\u78ba\u5b9f\u306b\u69cb\u6587\u30a8\u30e9\u30fc\u3067\u52d5\u304d\u307e\u305b\u3093\u3002<br \/>\n\u307e\u305f\u3001ComputeShader\u3092\u6271\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3060\u3051\u898b\u3066\u3082StructuredBuffer\u3084RWStructuredBuffer\u306a\u3069\u306e\u4f7f\u3044\u65b9\u306f\u5168\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>3. <a href=\"https:\/\/medium.com\/@lordned\/unreal-engine-4-rendering-overview-part-1-c47f2da65346\" rel=\"noopener\" target=\"_blank\"><strong>Unreal Engine 4 Rendering Part 1: Introduction<\/strong><\/a><br \/>\n4. <a href=\"https:\/\/medium.com\/@lordned\/unreal-engine-4-rendering-part-2-shaders-and-vertex-data-80317e1ae5f3\" rel=\"noopener\" target=\"_blank\"><strong>Unreal Engine 4 Rendering Part 2: Shaders and Vertex Data<\/strong><\/a><\/p>\n<p>Unreal Engine 4\u958b\u767a\u30c1\u30fc\u30e0\u306e\u65b9\u306b\u3088\u308b\u3001UE4\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306b\u3064\u3044\u3066\u306e\u795e\u8a18\u4e8b\u3002\u975e\u5e38\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002\u7279\u306bPart 2\u3067\u306f\u3001HLSL\u30b3\u30fc\u30c9\u3068C++\u30b3\u30fc\u30c9\u3068\u306e\u9023\u643a\u304c\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u306a\u3069\u3001\u8a73\u3057\u304f\u89e3\u8aac\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u6b20\u70b9\u306f\u3001<strong>\u3053\u306e\u8a18\u4e8b\u3092\u898b\u3064\u3051\u308b\u307e\u3067\u306b\u8d85\u7d76\u6642\u9593\u304c\u304b\u304b\u3063\u305f<\/strong>\u3053\u3068\u3002\u3053\u3093\u306a\u826f\u8a18\u4e8b\u306a\u306e\u306b\u3001\u306a\u3093\u3067Unreal Engine 4\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u66f8\u304b\u308c\u3066\u306a\u3044\u3093\u3060\u3088\u2026\uff01<\/p>\n<p>\u53c2\u8003GitHub\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff1a<br \/>\n5. <a href=\"https:\/\/github.com\/Temaran\/UE4ShaderPluginDemo\" rel=\"noopener\" target=\"_blank\"><strong>https:\/\/github.com\/Temaran\/UE4ShaderPluginDemo<\/strong><\/a><\/p>\n<p>Unreal Engine\u3067\u306eComputeShader\u3092\u8abf\u3079\u3088\u3046\u3068\u3057\u3066\u307e\u305a\u6700\u521d\u306b\u51fa\u3066\u304f\u308b\u306e\u304c\u304a\u305d\u3089\u304f\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3002<br \/>\n\u30b3\u30fc\u30c9\u3092\u8ffd\u3063\u3066\u3044\u304f\u3068\u3060\u3044\u3076\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001Uniform Buffer\u306e\u4f7f\u3044\u65b9\u3082\u308f\u304b\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001\u3044\u304b\u3093\u305b\u3093\u30b3\u30fc\u30c9\u304c\u53e4\u3044\u3067\u3059\u3002<br \/>\n\u5b9f\u306fUE4.17\u7528\u306ePull Request\u304c\u3042\u308b\u306e\u3067\u3001\u5c11\u306a\u304f\u3068\u3082\u305d\u3061\u3089\u3092\u898b\u305f\u307b\u3046\u304c\u826f\u3044\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/Temaran\/UE4ShaderPluginDemo\/pull\/9\" rel=\"noopener\" target=\"_blank\"><strong>https:\/\/github.com\/Temaran\/UE4ShaderPluginDemo\/pull\/9<\/strong><\/a><\/p>\n<p>StructuredBuffer\u3082RWStructuredBuffer\u3082\u4f7f\u3063\u3066\u304a\u3089\u305a\u3001\u3044\u304d\u306a\u308aRWTexture2D\u3092\u7528\u3044\u3066\u3044\u308b\u306e\u3082\u96e3\u70b9\u3002<\/p>\n<p>6. <a href=\"https:\/\/github.com\/ufna\/VaOcean\/tree\/master\" rel=\"noopener\" target=\"_blank\"><strong>https:\/\/github.com\/ufna\/VaOcean\/tree\/master<\/strong><\/a><\/p>\n<p>\u77e5\u3063\u3066\u3044\u308b\u4eba\u306f\u77e5\u3063\u3066\u3044\u308b<a href=\"https:\/\/wiki.unrealengine.com\/VaOcean_Plugin\" rel=\"noopener\" target=\"_blank\"><strong>the ocean surface simulation plugin for Unreal Engine 4<\/strong><\/a>\u3067\u3059\u3002<br \/>\nStructuredBuffer\u3084RWStructuredBuffer\u304c\u8272\u3005\u4f7f\u308f\u308c\u3066\u304a\u308a\u975e\u5e38\u306b\u52c9\u5f37\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u7279\u306bStructuredBuffer\u3092\u7528\u3044\u308b\u5834\u5408\u306f\u3001\u5f8c\u8ff0\u3059\u308b<a href=\"https:\/\/api.unrealengine.com\/INT\/API\/Runtime\/RHI\/FStructuredBufferRHIRef\/index.html\" rel=\"noopener\" target=\"_blank\"><strong>FStructuredBufferRHIRef<\/strong><\/a>\u3084<a href=\"https:\/\/api.unrealengine.com\/INT\/API\/Runtime\/RHI\/FShaderResourceViewRHIRef\/index.html\" rel=\"noopener\" target=\"_blank\"><strong>FShaderResourceViewRHIRef<\/strong><\/a>\u3092\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3067\u306f\u306a\u304f\u30e1\u30f3\u30d0\u5909\u6570\u3068\u3057\u3066\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u3092\u7406\u89e3\u3067\u304d\u308b\u306e\u306f\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u306e\u307f\u3067\u3059\u3002<\/p>\n<p>7. <a href=\"https:\/\/github.com\/IntelSoftware\/ue4-parallel\" rel=\"noopener\" target=\"_blank\"><strong>https:\/\/github.com\/IntelSoftware\/ue4-parallel<\/strong><\/a><\/p>\n<p>\u306a\u3093\u3068Intel\u516c\u5f0f\u3067\u3001Unreal Engine 4\u7528\u306eComputeShader\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u2026\uff01<br \/>\n\u5168\u7136\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u306f\u79c1\u3060\u3051\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u2026\uff1f<\/p>\n<p>\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u89e3\u8aac\u3082\u304b\u306a\u308a\u30ac\u30c1\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/software.intel.com\/en-us\/articles\/code-sample-an-approach-to-parallel-processing-with-unreal-engine\" rel=\"noopener\" target=\"_blank\"><strong>Code Sample: An Approach to Parallel Processing with Unreal Engine* | Intel\u00ae Software<\/strong><\/a><br \/>\n<a href=\"https:\/\/software.intel.com\/en-us\/articles\/unreal-engine-4-parallel-processing-school-of-fish\" rel=\"noopener\" target=\"_blank\"><strong>Unreal Engine 4 Parallel Processing School of Fish | Intel\u00ae Software<\/strong><\/a><\/p>\n<p>\u305f\u3060\u3001\u6700\u521d\u306b\u89e3\u8aac\u3057\u305f\u3088\u3046\u306b\u3001Unreal Engine 4\u3067\u306fGPU\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u3092\u76f4\u63a5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e0\u5024\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u306a\u3044\u305f\u3081\u3001Intel\u3055\u307e\u306e\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3082\u3001\u8a08\u7b97\u7d50\u679c\u306f\u4e00\u65e6TArray\u306e\u5f62\u3067CPU\u5074\u306b\u623b\u3057\u3066\u304a\u308a\u3001\u3068\u3066\u3082\u52ff\u4f53\u306a\u3044\u3067\u3059\u3002<br \/>\n\u305d\u308c\u3067\u3082\u3053\u306e\u8a18\u4e8b\u4e2d\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001CPU\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9\u3067\u306f2FPS\u3060\u3063\u305f\u3082\u306e\u304cComputeShader\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u308a30FPS\u306b\u307e\u3067\u9ad8\u901f\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6d41\u77f3Intel\u3055\u307e\u3060\u3051\u3042\u3063\u3066\u3001\u30b3\u30fc\u30c9\u3082\u3068\u3066\u3082\u3057\u3063\u304b\u308a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306e\u307f\u3001FRenderCommandFence\u3082\u304d\u3061\u3093\u3068\u4f7f\u308f\u308c\u3066\u304a\u308a\u307e\u3059\uff08\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u898b\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u3001\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u306a\u304b\u3063\u305f\u3067\u3059\u2026\uff09\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u30b3\u30fc\u30c9\u306f\u57fa\u672c\u7684\u306b\u306f\u3053\u306eIntel\u3055\u307e\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001RWStructuredBuffer\u3057\u304b\u4f7f\u308f\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001StructuredBuffer\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306fVaOcean\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u8003\u306b\u52c9\u5f37\u3057\u307e\u3057\u305f\u3002<br \/>\n\uff08Epic Games\u304c\u3053\u3046\u3044\u3046\u30b5\u30f3\u30d7\u30eb\u66f8\u3044\u3066\u304f\u308c\u308b\u3068\u826f\u3044\u306e\u3067\u3059\u304c\u2026\uff09<\/p>\n<p>\u2026\u3042\u308c\u3001\u30a4\u30f3\u30c8\u30ed\u3060\u3051\u3067\u9577\u6587\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u2026\u3002<br \/>\n\u306e\u3067\u3001\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u306f\u6b21\u56de\u3001\u6b21\u3005\u56de\u306e\u8a18\u4e8b\uff08<a href=\"http:\/\/www.sciement.com\/tech-blog\/c\/structured_buffer_compute_shader_ue4_part2\/\" rel=\"noopener\" target=\"_blank\"><strong>\u305d\u306e\uff12\uff1aC++\u5074\u30b7\u30a7\u30fc\u30c0\u30af\u30e9\u30b9<\/strong><\/a>\u3001<a href=\"http:\/\/www.sciement.com\/tech-blog\/c\/structured_buffer_compute_shader_ue4_part3\/\" rel=\"noopener\" target=\"_blank\"><strong>\u305d\u306e\uff13\uff1a\u5b9f\u969b\u306b\u7528\u3044\u308b<\/strong><\/a>\uff09\u306b\u307e\u308f\u3059\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity\u3067\u306fGPGPU\u3092\u30d5\u30eb\u6d3b\u7528\u3059\u308b\u305f\u3081\u306bComputeShader\u3092\u7528\u3044\u305f\u7f8e\u3057\u3044\u53ef\u8996\u5316\u4e8b\u4f8b\u304c\u305f\u304f\u3055\u3093\u3042\u308a\u3001\u7279\u306bIndie Visual Lab\u3055\u3093\u306b\u3088\u308bUnity Graphics Programming (vol. &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12,11,6],"tags":[],"class_list":["post-243","post","type-post","status-publish","format-standard","hentry","category-c","category-computeshader","category-hlsl","category-unreal-engine-4"],"_links":{"self":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=243"}],"version-history":[{"count":8,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":275,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/posts\/243\/revisions\/275"}],"wp:attachment":[{"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sciement.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}